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.
Find command
Name: newone Date: July 10, 2003 at 11:21:10 Pacific OS: N/A CPU/Ram: N/A
Comment:
Hi: Suppose if I have a find command which looks in the current directory and subdirectories in it as follows,
find ./ -type f -name "file"
is there a way to specify within the find command asking it not to look in a particular subdirectory within the current directory ?
Name: nails Date: July 10, 2003 at 13:51:06 Pacific
Reply:
Hi:
If your version of find supports -prune you can do this:
find . -name yourdirtoskip -prune -o -print
Regards,
Nails
0
Response Number 2
Name: newone Date: July 11, 2003 at 06:58:58 Pacific
Reply:
In the above command find . -name yourdirtoskip -prune -o -print , what does -o do
0
Response Number 3
Name: nails Date: July 11, 2003 at 14:04:52 Pacific
Reply:
Hi:
The -o is the boolean "or" operator. The way it works is that if the directory to skip is found, it's pruned (skipped) and everything after that i.e. the -print option is ignored. The -prune fails on every other obect, and that object prints.
Summary: Hy, Does someone know how to setup "find" command allowing to find all files or directories according to a specific filter whatever case sensitive (I'm working on AIX platform 4.3.3). Example: fi...
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 ...