![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with find and tar | venu_nbk | UNIX for Dummies Questions & Answers | 2 | 11-20-2006 07:41 AM |
| problem with find | braindrain | Shell Programming and Scripting | 2 | 03-29-2006 09:33 AM |
| how to find Script file location inside script | asami | Shell Programming and Scripting | 10 | 03-14-2006 09:57 PM |
| Problem with `find ...` | Cameron | Shell Programming and Scripting | 4 | 08-10-2005 04:24 AM |
| Another Find Problem | sethkor | Shell Programming and Scripting | 6 | 02-24-2005 04:56 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with find in script
Hi
I am updating one script as follows find $HOME -mount -size +1 \( ! \( -name *_Entry_*.xml.gz \) -name "*.gz" -o -name "*.Z" \) -mtime +1 -print | becomes: find $HOME -mount -size +1 \( ! \( -name *_Entry_*.xml.gz -o -name *_ECI_*.xml.gz \) -name "*.gz" -o -name "*.Z" \) -mtime +1 -print | But it seems that the newer version does not work. Could you pls help me and tell me what I'm doing wrong. Thanks a lot Cheers Gnom |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You also need to quote the patterns inside the braces, especially when they contain wildcards, otherwise the command works fine:
Code:
find $HOME -mount -size +1 \( ! \( -name "*_Entry_*.xml.gz" -o -name "*_ECI_*.xml.gz" \) -name "*.gz" -o -name "*.Z" \) -mtime +1 -print |
|
#3
|
|||
|
|||
|
Thank you very much rubin
Cheers gnom |
|||
| Google The UNIX and Linux Forums |