LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-30-2008, 04:34 PM   #1
linuxfia
Member
 
Registered: Apr 2008
Distribution: ubuntu 7.10, centos 4 & 5
Posts: 84

Rep: Reputation: 15
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!
 
Old 10-30-2008, 05:00 PM   #2
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
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.
 
Old 10-30-2008, 05:21 PM   #3
linuxfia
Member
 
Registered: Apr 2008
Distribution: ubuntu 7.10, centos 4 & 5
Posts: 84

Original Poster
Rep: Reputation: 15
Cool, thanks
 
Old 10-30-2008, 05:29 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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.
 
Old 10-31-2008, 02:55 PM   #5
linuxfia
Member
 
Registered: Apr 2008
Distribution: ubuntu 7.10, centos 4 & 5
Posts: 84

Original Poster
Rep: Reputation: 15
Thanks, cool command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using cp to copy directory permissions recursively? SirTristan Linux - Newbie 3 11-25-2007 08:36 AM
How to Recursively Set Permissions for Directories Only edwin11 Linux - Software 4 12-30-2005 09:54 AM
Setting permissions recursively ojbyer@usa.net Linux - General 4 12-15-2005 07:24 PM
Recursively listing files over FTP? overbored Linux - Software 4 10-14-2004 12:12 PM
recursively listing directories full paths kubicon Linux - Newbie 2 02-22-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration