roberttran
[H]ard|Gawd
- Joined
- Aug 15, 2002
- Messages
- 1,471
I am trying to get a listing of all files in a directory with permissions and full path.
"ls -R -l /directory/" will list all items like:
"find /directory/" will list all items like:
I would like the files to be listed like:
I've tried combinations of piping ls into find or find into ls but I can't seem to figure it out.
Any tips? My end goal is to be able to send the output to a file that I can import into excel for reporting of directory/file permissions.
Thanks,
Robert
"ls -R -l /directory/" will list all items like:
Code:
/directory/:
total 2
-rwxr--r-- 1 robert wheel 228368384 Nov 29 2004 file1
-rwxr--r-- 1 robert wheel 230969344 Nov 29 2004 file2
/directory/subdir/:
total 2
-rwxr--r-- 1 robert wheel 231034880 Nov 29 2004 file3
-rwxr--r-- 1 robert wheel 230402048 Nov 29 2004 file4
"find /directory/" will list all items like:
Code:
/directory/file1
/directory/file2
/directory/subdir/file3
/directory/subdir/file4
I would like the files to be listed like:
Code:
-rwxr--r-- 1 robert wheel 228368384 Nov 29 2004 /directory/file1
-rwxr--r-- 1 robert wheel 230969344 Nov 29 2004 /directory/file2
-rwxr--r-- 1 robert wheel 231034880 Nov 29 2004 /directory/subdir/file3
-rwxr--r-- 1 robert wheel 230402048 Nov 29 2004 /directory/subdir/file4
I've tried combinations of piping ls into find or find into ls but I can't seem to figure it out.
Any tips? My end goal is to be able to send the output to a file that I can import into excel for reporting of directory/file permissions.
Thanks,
Robert