![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to prune multiple branches with find? | siegfried | UNIX for Dummies Questions & Answers | 1 | 04-11-2008 04:52 AM |
| find command with prune help | venu_nbk | UNIX for Dummies Questions & Answers | 2 | 05-28-2007 07:25 AM |
| finding files using prune option | subodh.sharma | Shell Programming and Scripting | 1 | 11-02-2005 11:11 AM |
| Use -prune with find command on AIX | FuzzySlippers | UNIX for Dummies Questions & Answers | 5 | 11-08-2002 09:24 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
find with prune option
Hello-
I'm trying to write a find command that will exclude certain directories to speed up the find and search the rest of the directory structure to list any files that contain the specified values listed in my egrep. Specifically, I want the command below to search the current directory and all sub-directories EXCEPT for the "log" and "out" directories and give me a list of file names that contain "sun1216, sun1586, sun1153, PRIVIS1, PRIVIS2". I expected the command below to do the trick but it appears to not work. find . -follow \( -name "log" -o -name "out" \) -prune | xargs egrep -li "sun1216|sun1586|sun1153|PRIVIS1|PRIVIS2" Any suggestions on what's wrong? Any suggestion on using exec versus xargs? Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|