![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 | Thread Starter | Forum | Replies | Last Post |
| Question on Find Utility | marlonus999 | Shell Programming and Scripting | 5 | 09-19-2007 12:53 AM |
| question about find command | hnhegde | UNIX for Dummies Questions & Answers | 4 | 10-26-2006 12:00 PM |
| Find command question | negixx | Shell Programming and Scripting | 6 | 07-08-2005 08:43 AM |
| find ...question. | moxxx68 | UNIX for Dummies Questions & Answers | 2 | 10-25-2004 07:02 AM |
| 'find' command question | xyyz | UNIX for Dummies Questions & Answers | 2 | 03-07-2002 04:28 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
find question
Is it possible for find to match on multiple arg's. Basically, I would like to be able to match on name and atime. Basically I want something like:
find . -atime +31 <AND> -name *.log -exec rm -f {} \; Thanks
__________________
[url=http://chuckb.1le.net/]My website[/url] |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
acording to the man page if i read it correctly i dont see any reason it should not work.
none of those options are not supported by the other. |
|
#3
|
||||
|
||||
|
They should work. You have to use -a or -o in between the conditions you specify. (-a for and; -o for or) For example:
find ( -atime 31 ) -a ( -name \*.log ) -exec rm -f {} \; I'm not sure if the syntax is 100% correct (I didn't test this) but I've done stuff similar to that before in scripts, where I strung like 10 or 11 different conditions on one find command. Hope this helps |
||||
| Google The UNIX and Linux Forums |