Results 1 to 5 of 5
I need some help listing files that have certain permisions.
What I want is a list of all files that have the execute attribute set for the owner. I need ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-16-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 2
find command options
I need some help listing files that have certain permisions.
What I want is a list of all files that have the execute attribute set for the owner. I need the search to be done recursively in a directory specified by me.
For this, I have found the command find, but the following line
find -perm u=x -maxdepth 10
did not produce any output, although it was run in a directory with subdirectories containing executable files.
What am I doing wrong?
- 03-16-2008 #2Linux Newbie
- Join Date
- Jan 2008
- Location
- UK
- Posts
- 211
Hi there, try:
find /home/whatever/top_directory_to_start_search_in -maxdepth 10 -user fred -perm -+x
this will find executables for user fred to depth of 10 sub-directories.
- 03-16-2008 #3Just Joined!
- Join Date
- Mar 2008
- Posts
- 2
thank you
Thanks a lot, it works.
Is there a way to leave out directories from this list?
- 03-16-2008 #4Linux Newbie
- Join Date
- Jan 2008
- Location
- UK
- Posts
- 211
Looking at what find can do, it has -prune but this only stops it from descending into the directory. I would suggest, unless somebody knows different, writing a shell script that runs several find commands and outputs them to files or does what you need to do to them. I suggest this as then in my opinion it is more controllable and customizable.
- 03-23-2008 #5


Reply With Quote

