Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Limiting the find command
Name: hoogcg Date: December 17, 2004 at 11:55:08 Pacific OS: HP-UX CPU/Ram: Not relevent
Comment:
Is there a way to limit the find command from searching in subdirectories below the directory the search is started in?
If you are going to look only at the top directory, have you considered using ls -la with some sort of script?
0
Response Number 2
Name: Jc Date: December 18, 2004 at 00:27:30 Pacific
Reply:
Refer the options -maxdepth and -mindepth of find command
man find
-maxdepth levels Descend at most levels (a non-negative integer) levels of directories below the command line arguĀ ments. `-maxdepth 0' means only apply the tests and actions to the command line arguments.
-mindepth levels Do not apply any tests or actions at levels less than levels (a non-negative integer). `-mindepth 1' means process all files except the command line arguments.
Summary: hello unix admin folks I need to clean up my root filesystem because a backup caused the fs full. I know that it accidentally write some file with big size to root I tried the find command with type...
Summary: Hi, Anyone knows how to use the 'find' command using a specified depth level within the directoy hierarchy? for instance: find * -type f -name this will search including all subdirectories, is there ...
Summary: Hi: The "unmatched single quote" error doesn't make much sense since there's no single quotes in the find command I've posted. Two issues: 1) Are you aware that the "\" character at the end of the fi...