Re: find command tweak

From: Bob.Kelley@BRINKSINC.COM
Date: Fri Mar 12 2004 - 14:29:27 EST


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.
972-877-5341

|---------+----------------------------->
| | "Harvey, Bruce T."|
| | <BTHarvey@LMUS.LEG|
| | GMASON.COM> |
| | Sent by: IBM AIX |
| | Discussion List |
| | <aix-l@Princeton.E|
| | DU> |
| | |
| | |
| | 03/12/2004 01:12 |
| | PM |
| | Please respond to |
| | IBM AIX Discussion|
| | List |
| | |
|---------+----------------------------->
>------------------------------------------------------------------------------------------------------------------------------|
  | |
  | To: aix-l@Princeton.EDU |
  | cc: |
  | Subject: Re: find command tweak |
>------------------------------------------------------------------------------------------------------------------------------|

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
Legg Mason Wood Walker, Inc.
Corporate Technology - UNIX Admin.
Red Run 2nd Floor - Owings Mills, MD
(410) 580-7383 - BTHarvey@LeggMason.com
-------------------------------------------------------

-----Original Message-----
From: Bob.Kelley@BRINKSINC.COM [mailto:Bob.Kelley@BRINKSINC.COM]
Sent: Friday, March 12, 2004 1:35 PM
To: aix-l@Princeton.EDU
Subject: find command tweak

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
IMPORTANT: The security of electronic mail sent through the Internet
is not guaranteed. Legg Mason therefore recommends that you do not
send confidential information to us via electronic mail, including social
security numbers, account numbers, and personal identification numbers.

Delivery, and timely delivery, of electronic mail is also not
guaranteed. Legg Mason therefore recommends that you do not send
time-sensitive
or action-oriented messages to us via electronic mail, including
authorization to "buy" or "sell" a security or instructions to conduct any
other financial transaction. Such requests, orders or instructions will
not be processed until Legg Mason can confirm your instructions or
obtain appropriate written documentation where necessary

NOTICE TO BRINK'S EMPLOYEES:
All electronic mail communications composed, sent, received or stored on or
through Brink's equipment are subject to the Brink's Electronic
Communications Policy. Employees should have no expectation of privacy in
their use of the Company's electronic mail system.



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