Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: unix question
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).
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