Hi,
i need to put files with current date at end from one server to another.
i.e. all the output files from below comand.
am using
but no files are transfered
can someone please help me with this.
Thanks
sim
Last edited by Scott; 06-16-2013 at 10:47 AM..
Reason: Please use code tags
Just Ice is correct: yes, there are commands like "ls" or "cd" inside "ftp", but these are not UNIX-commands at all. These are just subcommands inside "ftp". "ftp" is not just another shell, but an application program.
If you want to send a list of files which is more complicatedly constructed than via a single file glob (something like "mput *txt") you will have to preapre a list before and then use "ftp" inside a loop to transfer the files one by one. Another possibility is to prepare a command list for ftp and then use this document as input to ftp.
Still, i think you should forget ftp altogether and use some other tool, namely "scp". This is scriptable, it doesn't require you to put passwords inside scripts and it doesn't transmit passwords or files unencrypted over the network. "ftp" should NOT be used in any network environment any more.
i tried the second option to use for loop and send filename one by one but it din work.
I get the below output
Connected to gbdsnh18.hartfordlife.com.
220 gbdsnh18 FTP server ready.
331 Password required for tc20022.
230 User tc20022 logged in.
200 Type set to I.
250 CWD command successful.
Local directory now /nas/gbd_appdba/gbdsnh19
We only support non-print format, sorry.
i: No such file or directory
?Invalid command
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 289 bytes in 0 transfers.
221-Thank you for using the FTP service on gbdsnh18.
221 Goodbye.
can you please give me a example to use scp in such case. i will give a try for that.
Hello All,
we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below:
abc.txt
------------------
line1
line2
line3
$$EDWS_DATE_INSERT=08-27-2019
line4
$$EDWS_PREV_DATE_INSERT=08-26-2019
I am trying to... (1 Reply)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
hi all,
How to compare two files whether they are same are not...? like i had my input files as 20141201_file.txt and 20141130_file2.txt
how to compare the above files based on date .. like todays file and yesterdays file...? (4 Replies)
Hi All,
I need to find all files other than first two files dates & last file date for month and month/year wise list.
lets say there are following files in directory
Mar 19 2012 c.txt
Mar 19 2012 cc.txt
Mar 21 2012 d.txt
Mar 22 2012 f.txt
Mar 24 2012 h.txt
Mar 25 2012 w.txt
Feb 12... (2 Replies)
Hi all,
i need to write a shell script to transfer a file modified after a particular date from one server to another. I searched for the related posts in this forum and got hints and snippets for it. i tried the below code
ftp serverA
user uname pwd
lcd to_dir
cd from_dir
files=$(find... (7 Replies)
I need to build a k shell script that will sort files in a directory where files appear like this "XXXX_2008021213.DAT. I need to sort by date in the filename and then move files by individual date to a working folder. concatenate the files in the working folder then start a process once... (2 Replies)
Hi ,
I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated.
Thanks,
Ravi :) (1 Reply)
Hi ,
I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated.
Thanks,
Ravi :) (1 Reply)
Hi ,
I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated.
Thanks,
Ravi :) (1 Reply)
hi!
I want to "get/mget" files from a FTP server,
selecting on age of existing files at remote host.
example in natural lang:
"get all files from FTP-server newer than 2 days".
I'm presently trying to "output - grep - awk on date/time - mget".
Doesn't work very good.
Has any1... (6 Replies)