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: Quintin, Richard <rquintin_at_vt.edu>
Date: Wed, 19 Nov 2003 12:50:05 -0800
Message-ID: <F001.005D7309.20031119125005@fatcity.com>


How about something like

dir=foo
if [ `ls -1 $dir` -lt 4 ]; then
  find $dir -mtime +4 | xargs rm
fi

On Wed, 2003-11-19 at 15:20, ryan_oracle_at_cox.net wrote:
> 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
Richard Quintin, DBA
Information Systems & Computing, DBMS
Virginia Tech

-- 
"Please give me some good advice in your next letter. I promise not to
follow it." -- Edna St. Vincent Millay
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Quintin, Richard
  INET: rquintin_at_vt.edu

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 - 14:50:05 CST

Original text of this message

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