Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Dear friend ,
I am going to create a customized ftp script . Scenario is stated below :
Suppose, I have two big size folder "test1" and "test2" . My mission is , Firstly i make those files as a "tar" file and then transfer the files to another machine using "ftp" protocol with time stamp facility (system date with time) .Script is :
Date=`date +%d%b%Y`.`date +%I`.`date +%M%p`
tar -cvf test1_$Date.tar test1
tar -cvf test2_$Date.tar test2
ftp -i -v -n 192.168.10.1 <<END_FTP
user oracle oracle
It works fine . this script create the file Like " test1_01Jan2008.08.10AM.tar " and "test2_01Jan2008.08.10AM.tar"
Now my problem is :
suppose file1 and file2 take 2 minutes to make "tar" file like following way :
In this situation , After two minutes my system date goes to 08:12AM . So that my next two lines
"mput test2_$Date.tar" and "mput test2_$Date.tar" are not executed . Because at that moment system date is 08:12AM , which are not matched with previous two lines .
Here in this stage i need urs help . Can any body plz give me any suggestions ........Waiting for kind reply ...
Another Question ,
Is it possible to ftp more than one file together ? Like following :