f



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

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

0
wleung7 (43)
6/22/2006 7:19:51 PM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

1 Replies
710 Views

Similar Articles

[PageSpeed] 43

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 
0
dfeustel
6/22/2006 11:33:27 PM
Reply: