LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   listing all the permissions recursively (https://www.linuxquestions.org/questions/linux-general-1/listing-all-the-permissions-recursively-680103/)

linuxfia 10-30-2008 04:34 PM

listing all the permissions recursively
 
How do I list all the directories/files' owner/group ownership permissions recursively?
Ex) /var/www/html/...
I'd like to list all the directories/files and their owner/group and permissions info.
If I do ls -l, it shows me the same level directories/files but not the sub-directories and files.

Thx!

arizonagroovejet 10-30-2008 05:00 PM

Code:

$ ls -lR
For other useful options, man is your friend

Code:

$ man ls
Or if you use KDE, type man:ls in to Konqueror's location field.

linuxfia 10-30-2008 05:21 PM

Cool, thanks

i92guboj 10-30-2008 05:29 PM

If you only want to see that info (file name and permissions) and nothing else, you can do

Code:

find /var/www/ -exec stat --format='%A %n' '{}' \;
Or %a if you wish to list the permissions in the -shorter- octal format.

Code:

man stat
To see all the available formatting codes.

linuxfia 10-31-2008 02:55 PM

Thanks, cool command.


All times are GMT -5. The time now is 09:38 PM.