Telengard |
12-27-2011 07:57 PM |
Quote:
Originally Posted by latimer
(Post 4559581)
How do I find the opposite? I tried find /var/run/amplify/ -name ! temp and find !(/var/run/amplify/ -name temp) but neither worked.
|
Try this:
Code:
find /var/run/amplify/ \! -name temp
This will find all files in and below the /var/run/amplify/ directory which are not named temp. If you only want directories, then try this:
Code:
find /var/run/amplify/ -type d \! -name temp
By default, find will recurse into all sub-directories of /var/run/amplify/. If you want to limit find to only act on names in /var/run/amplify/, then try this:
Code:
find /var/run/amplify/ -maxdepth 1 -type d \! -name temp
For the record, I would not want something like the running automatically. I don't recommend putting this in cron.
|