Hi All,
How to easily remove some particular files from more than one
directory. For example I have directories:
$ ls -l
total 12
drwx--+ 2 ovince None 0 Mar 6 16:36 DHbox1
drwx--+ 2 ovince None 0 Mar 7 08:30 DHbox10
drwx--+ 2 ovince None 0 Mar 6 16:36 DHbox2
Vince Oliver wrote:
Hi All,
How to easily remove some particular files from more than one
directory. For example I have directories:
$ ls -l
total 12
drwx--+ 2 ovince None 0 Mar 6 16:36 DHbox1
drwx--+ 2 ovince None 0 Mar 7 08:30 DHbox10
drwx--+ 2 ovince None 0
On 07 March 2007 at 10:49, in message
[EMAIL PROTECTED],
Sylvester Lykkehus [EMAIL PROTECTED] wrote:
Vince Oliver wrote:
Hi All,
How to easily remove some particular files from more than one
directory. For example I have directories:
$ ls -l
total 12
drwx--+ 2 ovince None 0
Gordon Ross wrote:
On 07 March 2007 at 10:49, in message
[EMAIL PROTECTED],
Sylvester Lykkehus [EMAIL PROTECTED] wrote:
Vince Oliver wrote:
Hi All,
How to easily remove some particular files from more than one
directory. For example I have directories:
$ ls -l
total 12
drwx--+ 2
thanks for reply. trick works :)
May I ask you for one more trick? How to remove ALL files from
directories EXCEPT '*.pro'?
Many thanks Sylvester
On Wed, 7 Mar 2007, Sylvester Lykkehus wrote:
Vince Oliver wrote:
Hi All,
How to easily remove some particular files from more than one
Vince Oliver wrote:
thanks for reply. trick works :)
May I ask you for one more trick? How to remove ALL files from
directories EXCEPT '*.pro'?
$ find DHbox* -type f -not -name *.pro -exec rm -f {} \;
Beware that find will recurse any directory below your DHbox*. Make sure
that's what you
On 07 March 07 05:29, Vince Oliver wrote:
snip
Vince, please don't top-post. Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Wednesday 07 March 2007 03:12, Philippe Andersson wrote:
Gordon Ross wrote:
...
$ find DHbox* -name *.dat -o -name *.pro -exec rm -f {} \;
would do. Omit the final -exec... to first check that it only
catches those files you want to get rid of.
If there are very many such files, execing
On Wed, Mar 07, 2007 at 08:01:10AM -0800, Randall R Schulz wrote:
On Wednesday 07 March 2007 03:12, Philippe Andersson wrote:
Gordon Ross wrote:
...
$ find DHbox* -name *.dat -o -name *.pro -exec rm -f {} \;
would do. Omit the final -exec... to first check that it only
catches those