Re: how to find all the permission for all files???

From: Jef Lee (jef.lee@ITVISION.COM.AU)
Date: Thu Jan 23 2003 - 20:03:37 EST


Did you want to find them ALL by permissions? This will list files only in
associated tmp files.
 
------------ SNIP HERE ------------
for USERPERM in 1 2 3 4 5 6 7
do
    for GROUPPERM in 1 2 3 4 5 6 7
    do
        for OTHERPERM in 1 2 3 4 5 6 7
        do
            FILEPERM=${USERPERM}${GROUPPERM}${OTHERPERM}
            find / -type f -perm ${FILEPERM} -print > /tmp/${FILEPERM}.txt
        done
    done
done
------------ SNIP HERE ------------
 
or you could use:
 
------------ SNIP HERE ------------
find / -type file -ls | awk '{print $3,substr($0,66)}' | sort >
/tmp/perms.txt
------------ SNIP HERE ------------
 
You might find that the one liner above is a little off if you have some
really big files that push the byte size column oversize. Then you'll get a
little bit of the previous column before the file name. Instead of using
the "substr" function, provided you have no files with blanks in the file
name, use the last column from the "ls" output like this:
 
------------ SNIP HERE ------------
find / -type file -ls | awk '{print $3,$11}' | sort > /tmp/perms.txt
------------ SNIP HERE ------------
 
Either way your permissions come out in text form, but all the files will be
collated by permissions.

-----Original Message-----
From: Denis Garrido Mendes [mailto:Denis.Mendes@TECBAN.COM.BR]
Sent: Thursday, 23 January 2003 8:52 PM
To: aix-l@Princeton.EDU
Subject: Re: how to find all the permission for all files???

Hi,

You can try this way:

find / ! -perm 444 -print

Denis Garrido Mendes
Produção - CETEM
Tecnologia Bancária S/A

        William Liu <borgliu@MAIL2000.COM.TW>
Enviado Por: IBM AIX Discussion List <aix-l@Princeton.EDU>

23/01/2003 01:29
Favor responder a borgliu

        
        Para: aix-l@Princeton.EDU
        cc:
        Assunto: how to find all the permission for all files???

Hi, all

I know " find / -perm 444 -print " can find out all the files that
permission are 444

but , is any way to find out all files' permission(by number, ex: 555,
444..etc)
because if I use my way list above, I must know all of combination
(444,644,777,664,666,555,655....etc)

so, I trying to find another way to directly list all files' permission .

is anyway to do so?

thanks.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:31 EDT