Re: find command tweak

From: Kevin Crocker (kevin@TEQ.NET)
Date: Fri Mar 12 2004 - 14:41:02 EST


At 01:29 PM 03/12/2004 -0600, you wrote:
>Thanks for that. Now how to go about the compress on all the files except
>*.Z and output from that find command??? any slick ideas?
>
>Bobby Kelley Jr.

>what about ...
>
> find /archivefiles -type f -mtime +2 ! -name "*.Z" -print
>
>
>Assuming you're using 'compress' ... change to *.gz for gzip, etc.
>
>Bruce T. Harvey

How about adding to the command something like:

find /archivefiles -type f -mtime +2 ! -name "*.Z" -print -exec compress
... {} \;

of course using the proper form of the compress command
not very efficient but it should work

Kevin



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:42 EDT