02-18-2016
Quote:
Originally Posted by
MadeInGermany
no x bit => the files' inodes (type,permissions,owner,group,length,time,contents) cannot be accessed, therefore the ? marks.
so it is. I became smart (
) and was then able to see the "correct" file listing. I'd never stumbled across anything quite like that before.
thanks to all for the assist.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am looking for all the header files (*.h).. which as per documentation of the UNIX system shouldbe there.
I am using
find / -name *.h -print
But it does't give anything.
My question is under what condition the "find" condition will fail to find the file?
What is the work around.
... (4 Replies)
Discussion started by: rraajjiibb
4 Replies
2. Windows & DOS: Issues & Discussions
I am working on a batch script where a filter is placed on a directory, and the files that come out of that filter have to be copied into another directory. More specifically, I am trying to set the results of a FIND command to a variable, so that I may access this variable / file later.
The... (2 Replies)
Discussion started by: JP Favara
2 Replies
3. Shell Programming and Scripting
Hey,
I am using 'find' to check the existence of a file which is created today, and this is what I have
find . -name $filename -mtime +0 -exec ls {} \;
my problem is I need to know what the above command actually get anything, so can anyone give me some pointer on how to do... (1 Reply)
Discussion started by: mpang_
1 Replies
4. Shell Programming and Scripting
Hi
I'm working on solaris and I'm trying to run a script. The part listed here does not work properly, the result of the find command is not in the output
file /tmp/result
(I've checked the find command , executing the shell with sh -x , it seems correct). It seems like I've lost the standard... (4 Replies)
Discussion started by: frenchwill
4 Replies
5. UNIX for Dummies Questions & Answers
Hi!
Could you please explain why the result order isn't in reverse time order as it is requestet by "xargs ls -ltr" command (ksh shell)? There are about 5000 files in dir.
$ find . -name "*201010*" -print |xargs ls -ltr |tail
-rw-r--r-- 1 oracle oinstall 54326 Nov 25 20:32... (2 Replies)
Discussion started by: laki47
2 Replies
6. Programming
Hi, The following code reads 20 characters from one file and writes them (appends them) to the other file. The code works in Turbo C++ on windows but it shows segmentation fault on Linux. I am using Ubuntu 10.10 and gcc compiler.
Please tell me where I was wrong.
#include<stdio.h>
void... (6 Replies)
Discussion started by: haritha.gorijav
6 Replies
7. UNIX for Dummies Questions & Answers
I created a file with the permissions of 776.
When I ran the command find /root/Desktop -perm -644 -type f
The created file shows up as part of the results.
Doesn't -perm -mode mean that for global, only 4(read) and 2(write) can be accepted ? (2 Replies)
Discussion started by: Hijanoqu
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a main folder 'home'. Lets say there is a folder 'bin' under 'home'. I want to check the list of files under subdirectories present under the /bin directory created in the last 24 hours.
I am using the following find command under home/bin directory:
find . -mtime -1 -print
... (3 Replies)
Discussion started by: DJose
3 Replies
9. UNIX for Dummies Questions & Answers
Has anyone ever encountered text from other files suddenly appearing in another data file that is not being used. There does not seem to be any reason for it, any thoughts would be useful.
Thanks (14 Replies)
Discussion started by: SRoberts
14 Replies
10. Shell Programming and Scripting
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT MOJAVE
strmode
STRMODE(3) BSD Library Functions Manual STRMODE(3)
NAME
strmode -- convert inode status information into a symbolic string
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h>
void
strmode(int mode, char *bp);
DESCRIPTION
The strmode() function converts a file mode (the type and permission information associated with an inode, see stat(2)) into a symbolic
string which is stored in the location referenced by bp. This stored string is eleven characters in length plus a trailing NUL.
The first character is the inode type, and will be one of the following:
- regular file
b block special
c character special
d directory
l symbolic link
p fifo
s socket
w whiteout
? unknown inode type
The next nine characters encode three sets of permissions, in three characters each. The first three characters are the permissions for the
owner of the file, the second three for the group the file belongs to, and the third for the ``other'', or default, set of users.
Permission checking is done as specifically as possible. If read permission is denied to the owner of a file in the first set of permis-
sions, the owner of the file will not be able to read the file. This is true even if the owner is in the file's group and the group permis-
sions allow reading or the ``other'' permissions allow reading.
If the first character of the three character set is an ``r'', the file is readable for that set of users; if a dash ``-'', it is not read-
able.
If the second character of the three character set is a ``w'', the file is writable for that set of users; if a dash ``-'', it is not
writable.
The third character is the first of the following characters that apply:
S If the character is part of the owner permissions and the file is not executable or the directory is not searchable by the owner, and
the set-user-id bit is set.
S If the character is part of the group permissions and the file is not executable or the directory is not searchable by the group, and
the set-group-id bit is set.
T If the character is part of the other permissions and the file is not executable or the directory is not searchable by others, and the
``sticky'' (S_ISVTX) bit is set.
s If the character is part of the owner permissions and the file is executable or the directory searchable by the owner, and the set-
user-id bit is set.
s If the character is part of the group permissions and the file is executable or the directory searchable by the group, and the set-
group-id bit is set.
t If the character is part of the other permissions and the file is executable or the directory searchable by others, and the ``sticky''
(S_ISVTX) bit is set.
x The file is executable or the directory is searchable.
- None of the above apply.
The last character will always be a space.
SEE ALSO
chmod(1), find(1), stat(2), getmode(3), setmode(3)
HISTORY
The strmode() function first appeared in 4.4BSD.
BSD
July 28, 1994 BSD