FTP on Linux is not working as expected

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat FTP on Linux is not working as expected
# 1  
Old 07-09-2009
FTP on Linux is not working as expected

Hi,

I need to write a Linux shell script which will perform an FTP operation to another server.
main.sh will contain -
ftp -nd Dest.IP.address < ftpScript.sh

Contents of ftpScript.sh is given below -

user userid passwd
prompt
lcd /vidya/Input
cd vidya/Output
mput *.*
close


This script runs perfectly fine when executed on HP platform. However, for some reason this script is not working as expected on Linux platform. I get following error -

---> SYST
Please login with USER and PASS.
---> USER anonymous
---> PASS XXXX
?Invalid command
: No such file or directoryidya/Input
---> CWD vidya/Output
---> QUIT


I am not able to figure our what is wrong with the script. What is being pointed to as "?Invalid command". When I execute the individual commands on command prompt, they all go through fine as well. Please help.

Thanks and Regards,
Vidya
# 2  
Old 07-12-2009
Does this work?

user userid passwd
prompt
mput /vidya/Input/*.* vidya/Output/
close
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Test -e not working as expected (by me)

I ran into the following and still do not understand entirely the rationale behind this. If someone could explain why things are as they are I'd be thankful. The following was tested on AIX 7.1 with ksh88, but i suspect that to be ubiquitous. In an installation routine i had to create a set of... (6 Replies)
Discussion started by: bakunin
6 Replies

2. Shell Programming and Scripting

Script not working as expected

Hi, I have prepared a script and trying to execute it but not getting expected output. Could you please help and advise what is going wrong. "If else" part in below script is not working basically. I am running it on HP-UX. for i in slpd puma sfmdb do echo "******\t$i\t*******" echo... (10 Replies)
Discussion started by: sv0081493
10 Replies

3. UNIX for Dummies Questions & Answers

Nohup not working as expected

Hi. I am trying to start a script on my router that will execute even if i log off. To execute the script I write: nohup ./dslconnection > dslstat.out 2>&1 & It starts the job: 21968 admin 1604 S /bin/ash ./dslconnection The problem is that when I log back in the job has been... (6 Replies)
Discussion started by: sebcou
6 Replies

4. Shell Programming and Scripting

echo is not working as expected

for i in `cat /export/home/afahmed/Arrvial_time.txt` do echo $i echo $i | awk '$3 < $D { print $4 }' >> dynamic_DF.txt; done When i echo, its echo as Nov 15 02:24 /export/home/pp_adm/inbound//wwallet_20111115.txt where i expect it to be Nov 15 02:24... (7 Replies)
Discussion started by: afahmed
7 Replies

5. Linux

FTP not working under Linux but working under any other OS ??? Very strange

Dear all, I am totally despaired and puzzled. Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem ! All commands are... (12 Replies)
Discussion started by: magix_ch
12 Replies

6. Shell Programming and Scripting

Why this is not working in expected way?

total=0 seq 1 5 | while read i ; do total=$(($total+$i)) echo $total done echo $totalThis outputs: 1 3 6 10 15 0whereas I am expecting: 1 3 6 10 15 15My bash version: (4 Replies)
Discussion started by: meharo
4 Replies

7. UNIX for Dummies Questions & Answers

Redirection not working as expected

Portion of my script below : if ; then NUMBEROFFEILDS=`cat ${BASE_SCRIPT_LOC}/standardfilecleanup.lst|grep -w ${db_file_path}|awk -F: '{print NF}'` COUNT=4 while ; do awk_var="$"`echo $COUNT` file_name1=`cat ${BASE_SCRIPT_LOC}/standardfilecleanup.lst|grep -w... (1 Reply)
Discussion started by: findprakash
1 Replies

8. Shell Programming and Scripting

which not working as expected

Hello. Consider the following magic words: # ls `which adduser` ls: /usr/sbin/adduser: No such file or directory # Hmmm... Then: # ls /usr/sbin/adduser /usr/sbin/adduser # Now what? Unforunately this little sniippet is used in my debian woody server's mysql pre install script.... (2 Replies)
Discussion started by: osee
2 Replies

9. UNIX for Dummies Questions & Answers

FTP/TELNET on linux, not working

I'm trying to ftp to my linux box from windows and from unix and its not working. I can telnet just fine, but ftp doesn't work. Where should I start looking? What config file is it that controls the ftp? Why does telnet work and ftp not? I'm using redhat 6.1, samba's working for browsing the... (33 Replies)
Discussion started by: kymberm
33 Replies

10. UNIX for Dummies Questions & Answers

FTP is not working after installing Linux 7.3

hi all, After installing Linux 7.3, when I wasn't be able to FTP to this machine from another machine; however, I do get the reply back when I ping this machine. All I want is able to transfer file on my local machine to this server using FTP comand and it's not working. Could someone please... (1 Reply)
Discussion started by: lapnguyen
1 Replies
Login or Register to Ask a Question