I want to redirect ls of server ftp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I want to redirect ls of server ftp
# 1  
Old 03-06-2009
I want to redirect ls of server ftp

Hello,

All is in the message, i would want to redirect the ls command in a file but i have problem.

In first, i have try this:
Code:
#!/bin/bash

ftp -n << EOF
open F3MONTK2SVK-01
user movie ""
binary
ls > /Users/eric
bye
EOF

but ftp don't want >

I try curl -l but i can't enter into the directory just in /

I instal so LFTP but i can't in my job because firewall

Help me, please
# 2  
Old 03-06-2009

Code:
#!/bin/bash

ftp -n  > /Users/eric << EOF
open F3MONTK2SVK-01
user movie ""
binary
ls
bye
EOF

# 3  
Old 03-06-2009
thanks, Mr cfajohnson, but i want redirect ls in a file for parse after, i haven't found a solution for put the out of ls in a file...
# 4  
Old 03-06-2009
Try this:
#!/bin/bash

ftp -n > /Users/eric << EOF
open F3MONTK2SVK-01
user movie ""
binary
ls > eric
get eric
bye
EOF
# 5  
Old 03-06-2009
Euh, excuse me i don't saw the begin of the script, IT'S GOOD THANKS.
# 6  
Old 03-06-2009
Quote:
Originally Posted by mehrdad68
Try this:
#!/bin/bash

ftp -n > /Users/eric << EOF
open F3MONTK2SVK-01
user movie ""
binary
ls > eric
get eric
bye
EOF
have you tried it?
# 7  
Old 03-06-2009
Yes vgersh99 i trie and it's good, it does that i want....thanks a lot for your answers...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ftp redirect

Hi i want to redirect a list of ftp file to an exsisting file by mls x.txt mylocalfile.txt result of this command corrupt my data on mylocalfile.txt , please help me (2 Replies)
Discussion started by: rezasadeghi
2 Replies

2. Shell Programming and Scripting

How to redirect the output of a command inside ftp block?

hi, i am using ftp to get files from remote server. inside the ftp i want to us ls -ltr command and send the output of it to a file. ftp -n remote_server <<_FTP quote USER username quote PASS password prompt noprompt pwd ls -ltr get s1.txt bye _FTP i... (4 Replies)
Discussion started by: Little
4 Replies

3. Shell Programming and Scripting

How to redirect output of a command to a variable during ftp mode?

Hi, How can I redirect the output of a following command to a variable. ftp myservername ftp> user (username) guptaji 331 Password required for guptaji. Password: ftp> size /home/salil/abc.dat ftp> a='size /home/salil/abc.dat' ?Invalid command I want to redirect value of size to... (1 Reply)
Discussion started by: Salil Gupta
1 Replies

4. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

5. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

6. Windows & DOS: Issues & Discussions

Office server => laptop =>client server ...a lengthy and laborious ftp procedure

Hi All, I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible. I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Discussion started by: kunwar
3 Replies

7. Red Hat

when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

Guys, Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session. I am using RHEL 5.3. root@]# ll total 1740... (2 Replies)
Discussion started by: shtobias
2 Replies

8. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

9. Shell Programming and Scripting

ftp script not able to connect to ftp server.

I have the following ftp script to get files from a remote location. However, on running the script I find that I am not even able to connect to ftp server. I am able to connect to ftp server using other GUI ftp tools like WS_FTP using the same IP. IP used here is a dummy IP. What can go... (3 Replies)
Discussion started by: gram77
3 Replies

10. Shell Programming and Scripting

redirect output of FTP

Hi, I call the FTP command from within a script. The call to FTP looks like this : ftp -n -i -v < $com >> "$logfile" Where $com is a commandfile and I want the output to be redirected to $logfile. If I do this call at the prompt it works perfect. (replacing the variables by there... (4 Replies)
Discussion started by: kcaluwae
4 Replies
Login or Register to Ask a Question