|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
"find": search the a regex of FILES??
I want to use the find command to search a ton of files, but I want to break it up into multiple machines. I want to search for files with "filename." in the title. The location I want to search is: Code:
/u/*/*/*/stuff On the first computer I want to search: Code:
/u/[a-i]/*/*/stuff Right now I am doing Code:
find /u/*/*/*/stuff -iregex "/u/[a-i]/.*filename\..*" -print >>~/Desktop/find This works correctly on the first machine, but for the second machine i will be searching [j-p] and in this case it will still search a-i first. I really want to do something like: Code:
find /u/[j-p]/*/*/stuff -iregex ".*filename\..*" -print >>~/Desktop/find Anyone know if/how I could do this? |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
specify a list of directory names for find to look through Code:
find u/1/2/3 u/a/b/s u/2/3/4/5 -type f -name '*filename*' -exec ls -l {} \;the bracket [a-j] may not work on all unix machines. If you have a gigantic list of directories put all of the directory names into a file, call it dirnames: Code:
find $(awk '{printf(" %s ", $0)}' dirnames) -type f -exec ls -l {} \; |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delete files older than "x" if directory size is greater than "y" | JamesCarter | Shell Programming and Scripting | 4 | 02-11-2010 07:41 AM |
| How to find all files containing "1234" in their inode number? | daredevil82m | UNIX for Dummies Questions & Answers | 2 | 01-05-2010 11:37 AM |
| How to use the "grep/egrep" command to search files. | rkhanal | UNIX for Dummies Questions & Answers | 6 | 01-19-2009 05:49 AM |
| "find command" to find the files in the current directories but not in the "subdir" | swamymns | Shell Programming and Scripting | 9 | 07-22-2008 11:23 AM |
| grep to find content in between curly braces, "{" and "}," | keshav_rk | Shell Programming and Scripting | 4 | 08-09-2007 10:14 PM |