Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unix Help
DEST_DIR=your_desination_directory
SOURCE_DIR=your_source_directory
for file in `ls $SOURCE_DIR`
do
fn=basename $file
if [ ! -f $DEST_DIR/$fn ]
then
cp $file $DEST_DIR/$fn
fi
done
Hope it helps.
Allan
-----Original Message----- From: Sujatha Madan [mailto:Sujatha.Madan_at_optus.net.au] Sent: Tuesday, October 07, 2003 10:24 PM To: Multiple recipients of list ORACLE-L Subject: Unix Help Hi, Sorry for the slightly non-Oracle post. I am after a UNIX code snippet that will help me copy archivelogs to another directory BUT not if they already exist. So if only 2 archive logs are generated between script runs only the two new ones should copy. I know I can do this using sysdate - "time interval" but I am trying to avoid that.
Thanks in advance,
Sujatha Madan.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Nelson, Allan
INET: anelson_at_midf.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 Oct 08 2003 - 08:09:27 CDT
![]() |
![]() |