Quote:
Originally Posted by
sreenusola
can some body look in to this please
#!/bin/ksh
find $CA_OUT_PATH/*/ftp_out -type f -mtime -200 |\
while read file
do
echo "$file"$(date +"%Y%m%d%H%M") | read newfile
cp $file $CA_OUT_PATH/ftp_logs/$newfile
done
can be modified to
#!/bin/ksh
find $CA_OUT_PATH/*/ftp_out -type f -mtime -200 |\
while read file
do
cp $file $CA_OUT_PATH/ftp_logs/tmp
done
for a in `ls -1 $CA_OUT_PATH/ftp_logs/tmp`
do
mv $CA_OUT_PATH/ftp_logs/tmp/$a $CA_OUT_PATH/ftp_logs/$a$(date +"%Y%m%d%H%M")
done
before that make a directory $CA_OUT_PATH/ftp_logs/tmp
mkdir $CA_OUT_PATH/ftp_logs/tmp
chmod -R 777 $CA_OUT_PATH/ftp_logs/tmp