![]() |
|
|
|
|
|||||||
| 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 |
| find and remove last week dir | kunimi | UNIX for Dummies Questions & Answers | 1 | 04-14-2008 04:37 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, remove, and ftp...... | peter.herlihy | UNIX for Dummies Questions & Answers | 1 | 06-25-2002 03:51 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
|
|||
|
|||
|
question on find and remove command
Hi All,
I have wrote a command to find a and remove all *.apr files ina directory . Now i got the request as reversed , They want to remove all files except *.apr in the direcory . Is it possible to do that in a find comand else i have give an explicit find command to all *. files to remove. Thanks, Arun |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
# list files in the current dir with "apr" extension find . -name "*.apr" -type f -maxdepth 1 # list files in the current dir WITHOUT "apr" extension find . ! -name "*.apr" -type f -maxdepth 1 |
|||
| Google The UNIX and Linux Forums |