Ftp issue please help.

Hi All.

I need to FTP a file say abc.dat to client server say xyz.ibm.com location /etc/passwd/ibm with user name and password.

I want to make sure my script when FTP the file abc.dat of 1000kb is correctly got transfered with the same contant every time to Clients server how do I confirm the same please reply.

Rgds
Ann.

Use sftp OR scp.. Its 100% guaranteed secure and integrity is full proof than ftp. and you need not send across the id and password over a TCP/IP network.

I could do!

how will i confirm whether the file I have transfered is got FPT'd.

If I transfer 100kb file to server(Its believed that some server will have different file size after transfer)...!

Let me clear its all a automated script i dont need to check again and again and confirm this is the file i have transfered!

#!/usr/bin/ksh
ftp -v -n "172.10.10.111" << cmd #( here you can give your server ip of hostname)
user "username" "passwd" #
cd /export/home/amit
lcd /export/home/ibm/
bin
hash
put filename ( you can put the file neme as avaribale and pass it to script)
quit
cmd

Not working :mad:

#!/bin/ksh
ftp -n -v 199.11.22.33
user: abc
password: xyz
cd /home/export/ibm
put abc.dat
bye

:rolleyes: !!!

what part is not working? please be as descriptive as possible.

The crdentials part is not working:

Username password instead auto login it waits for the username to type explicitly after running the script.

#!/bin/ksh
ftp -n -v 199.11.22.33 <<_EOF_
user userNAME userPASSWORD
cd /home/export/ibm
put abc.dat
bye
_EOF_

slightly different way

#!/bin/ksh
ftp -n -v -i 199.11.22.33 <<EOF
quote user abc
quote pass xyz
cd /home/export/ibm
put abc.dat
bye
EOF

I have modified your script try this

#!/bin/ksh
ftp -n -v "199.11.22.33" << cmd
user "abc" "xyz"
cd /home/export/ibm
put abc.dat
quit
cmd