Unix Programming - FTP failes to transfer file to target directory; 0 byte file left in source directory

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > June 2006 > FTP failes to transfer file to target directory; 0 byte file left in source directory





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author FTP failes to transfer file to target directory; 0 byte file left in source directory
John Smith

2006-06-22, 7:23 pm

problem is as stated in the file - the file does not appear in the
target directory after the running of the FTP script. any assistance
is appreciated.

Leads and follow up questions:

#1) can the source host be the same as the target host? (I have tried
the same and a different taget host)

#2) from the FTP log:
Starting FTP run
########################################
#########################
Thursday June 22 14:10:31 EDT 2006
Connected to tomxg00.
220 [hostname] FTP server (Authorized uses only. All activity may be
monitored and reported.) ready.
331 Password required for [username].
230 User [username] logged in.
200 Type set to I.
Local directory now [dirname]
250 CWD command successful.
200 PORT command successful.
150 Binary data connection for [filename] ([IP],[code]).
226 Transfer complete.
200 PORT command successful.
150 ASCII data connection for /bin/ls (IP, code) (0 bytes).
*.*20060621: No such file or directory
226 ASCII Transfer complete.
remote: *.*20060621
40 bytes received in 0.0021 seconds (18.65 Kbytes/s)
221 Goodbye.
End ########################################
#########################

#3) my FTP script:
echo "Starting FTP run
########################################
#########################" >>
/tmp/var_ftp_"$$".log
date >> /tmp/var_ftp_"$$".log
ftp -n -v -i $1 <<EOF >> /tmp/var_ftp_"$$".log
user $2 $3
bin
lcd $4
cd $6
put $5
dir *.*$7
bye
EOF
echo "End
########################################
#########################" >>
/tmp/var_ftp_"$$".log

#4) FTP script run as:
scriptname.sh [host] [UID] [PW] $src_dir $file_to_FTP $targetDir
20060621 > /tmp/tax.log

dfeustel@mindspring.com

2006-06-22, 7:23 pm

John Smith <wleung7@gmail.com> wrote:
> problem is as stated in the file - the file does not appear in the
> target directory after the running of the FTP script. any assistance
> is appreciated.
>
> Leads and follow up questions:
>
> #1) can the source host be the same as the target host? (I have tried
> the same and a different taget host)
>
> #2) from the FTP log:
> Starting FTP run
> ########################################
#########################
> Thursday June 22 14:10:31 EDT 2006
> Connected to tomxg00.
> 220 [hostname] FTP server (Authorized uses only. All activity may be
> monitored and reported.) ready.
> 331 Password required for [username].
> 230 User [username] logged in.
> 200 Type set to I.
> Local directory now [dirname]
> 250 CWD command successful.
> 200 PORT command successful.
> 150 Binary data connection for [filename] ([IP],[code]).
> 226 Transfer complete.
> 200 PORT command successful.
> 150 ASCII data connection for /bin/ls (IP, code) (0 bytes).
> *.*20060621: No such file or directory
> 226 ASCII Transfer complete.
> remote: *.*20060621
> 40 bytes received in 0.0021 seconds (18.65 Kbytes/s)
> 221 Goodbye.
> End ########################################
#########################
>
> #3) my FTP script:
> echo "Starting FTP run
> ########################################
#########################" >>
> /tmp/var_ftp_"$$".log
> date >> /tmp/var_ftp_"$$".log
> ftp -n -v -i $1 <<EOF >> /tmp/var_ftp_"$$".log
> user $2 $3
> bin
> lcd $4
> cd $6
> put $5
> dir *.*$7


Why is $7 appended to *.*?

> bye
> EOF
> echo "End
> ########################################
#########################" >>
> /tmp/var_ftp_"$$".log
>
> #4) FTP script run as:
> scriptname.sh [host] [UID] [PW] $src_dir $file_to_FTP $targetDir
> 20060621 > /tmp/tax.log
>


--
Using OpenBSD with or without X & KDE?
http://dfeustel.home.mindspring.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com