Automated FTP

Taking care of your Linux box.
refra
Naik
Posts: 69
Joined: Wed Dec 06, 2006 3:51 pm

Automated FTP

Postby refra » Thu Dec 26, 2013 3:14 pm

AOA,

I need a help about automated FTP process. scenario is

find a latest files according to the time stamp in /home/abc ; /d01/uat ; /demo/seen and upload all the files on ftp server according to date wise.

i find a latest file according to

#############################################################
DAT=`date '+%d-%b-%Y'`

find /home/abc /d01/uat /demo/seen -type f -newer chk >> logfile
cat logfile | while read FILES
do
lftp -u userid,passwd ftpserverip <<EOF
mkdir $DAT
cd $DAT
put $FILES
EOF
done
##################################################################
It executed perfectly, but gives a error like:

mkdir: Access failed: 550 26-Dec-2013: Cannot create a file when that file already exists

mashkoor.qadir
Lance Naik
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Location: Karachi
Contact:

Re: Automated FTP

Postby mashkoor.qadir » Thu Feb 20, 2014 7:24 pm

it seems ftp user doesn't have permission on the directory.

nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Re: Automated FTP

Postby nomankhn » Sun Feb 23, 2014 2:21 am



Return to “Administration”

Who is online

Users browsing this forum: No registered users and 1 guest