find command tweak

From: Bob.Kelley@BRINKSINC.COM
Date: Fri Mar 12 2004 - 13:35:15 EST


I'm trying to figure out a slick find and or ls command variation to do
the following:

I want to compress all files in "/archivefiles" with the following
requirements:
-files not already compressed
-do not compress files modified in the last two days

I was thinking something along the lines of:
find . -type f -mtime -2 -print > /archivefiles/do_not_compress_these.out
ls -lart|grep arch|grep -v Z|awk '{print $9}' >
/archivefiles/all_files_list.out
diff do_not_compress_these.out all_files_list.out >
actual_files_to_compress.out

Am I making this too hard?????????

Bobby Kelley Jr.
972-877-5341



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