Listing permissions with shell script
Hi,
I need to create a shell scipt, that lists the number of all files in a directory that the currently logged user has read permission, write permission and execute permissions. I'm trying to use the find-command with the -perm option, but is there a simple way to list all files with atleast read permissions etc? I mean not having to type tens of commands for ...-perm 400... -perm -444 and so on. Simple problem, but not for me ;) |
Number of files, in a directory /a/dir, for which current user has read, AND write, AND execute, permissions:
Code:
find /a/dir/ -perm -700 -print | wc -l Code:
find /a/dir/ -perm -400 -print | wc -l Code:
find /a/dir/ -perm +700 -print | wc -l |
All times are GMT -5. The time now is 03:40 PM. |