Good afternoon!
I need to move a bunch of files from an FTP site to my server.
However mget *, dele * will not suffice as I cannot guarantee that new files are not uploaded between commands.
Roughly, this is what I would like to do:
My problems are:
1)when running ls > files.lst in my csh script, files.lst is always empty, for whatever reason the output is not making it in a file, if I run an ls without the >, I do see 20 files.
2) when I have my files.lst, I need help with an awk/sed etc loop
Thank you so much for your help / ideas.
Derek
The syntax for ftp commands is not the same as that for ftp commands. You will need to remove the ">" from the command line. See "man ftp" options "ls" or "dir" for the syntax of the ftp directory list command on your target Operating System. The format of the output from a ftp directory list is variable and you may need further shell code to extract the filenames.
Last edited by methyl; 10-13-2009 at 07:28 PM..
Reason: Paraphrase.
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Hi
In directory /mnt/upload I have about 100 000 files (*.png) that have been created during the last six months. Now I need to move them to right folders. eg:
file created on 2014-10-10 move to directory /mnt/upload/20141010
file created on 2014-11-11 move to directory /mnt/upload/20141111... (6 Replies)
Hi folks,
In my application there is a job running which create a .dat file along with it zip file also at unix box location /opt/app/cvf/temp1
so in temp1 directory I have one .dat file and its zip file also.
Now since this job runs every day so if a job runs today there will be two files... (5 Replies)
Hi there,
I am having trouble with a script I have written, which is designed to search through a directory for a header and payload file, retrieve a string from both filenames, compare this string and if it matches make a backup of the two files then move them to a different directory for... (1 Reply)
Hi Team,
I have thousands of TIF files which are converted from PDF. Below is a sample of it.
LH9406_BLANCARAMOS_2012041812103210320001.tif
LH9406_BLANCARAMOS_2012041812103210320002.tif
LH9406_BLANCARAMOS_2012041812103210320003.tif
LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
hi all,
here is the description to my problem.
input parameter: $date1
based on the date i need to select three files starting with audit.log* based on its modified date, a date before, a date after(if its exists). We need to compare the input date to modified date of the file. And then... (3 Replies)
Hi
I can transfer a single file and multiple file from unix to widows using get and mget command.But i dont know How to transfer a whole directory from unix to windows using command.
pls help me
Ramkumar (1 Reply)
Hi,
My local server is :/usr/abcd/
Remote server is :/Usr/host/test/
I want to send files from local unix directory(All files starting with O_999) to
remote host unix directory.
Can any body give me the Unix Shell script to do this.
One more doubt: Shall we need to change the file... (1 Reply)