Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: unix question

RE: unix question

From: Bellow, Bambi <bbellow_at_chi.navtech.com>
Date: Wed, 19 Nov 2003 13:10:05 -0800
Message-ID: <F001.005D730D.20031119131005@fatcity.com>


USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE. COUNT=`ls -lrt <dir>/<name>|wc -l`
if [ $COUNT -ge 4 ] ;
then

    find <dir> -name <name> -mtime +4 -exec rm -f {} \; fi

USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE.USE WITH CARE. HTH,
Bambi.
-----Original Message-----
Sent: Wednesday, November 19, 2003 2:21 PM To: Multiple recipients of list ORACLE-L

I want to store some files. I make a new copy every night. I want to archive it back 4 days. So after 4 days, I want to delete the old copy. How do I do this?

However, if i miss a nightly batch and have less than 4 copies, I do not want to delete any?  

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: <ryan_oracle_at_cox.net
  INET: ryan_oracle_at_cox.net

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Bellow, Bambi
  INET: bbellow_at_chi.navtech.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Nov 19 2003 - 15:10:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US