how to get a file from a ftp server


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how to get a file from a ftp server
# 1  
Old 05-07-2010
how to get a file from a ftp server

Hi

If I have to download a file from the ftp server ftp.download.com for example to a solaris box. I know the directory the file is in and everything, but I am not sure how to get the file. usually, I use the command ftp <server name> and I connect, then I use the get or put command and all these stuffs. But I never had to ftp to a ftp server using this url format in a unix environment. Please help. I got the username and password for the server.
Will scp work in this case?
# 2  
Old 05-07-2010
You can still use the command line ftp command to connect to this site, assuming you aren't required to use a proxy. Log-in as anonymous with your email or whatever as password.
You might prefer wget if installed on your machine which is simpler to use:
Code:
wget ftp://ftp.example.com/directory/file

# 3  
Old 05-07-2010
Quote:
Originally Posted by Pouchie1
Will scp work in this case?
It's possible, but I suspect not. scp's independent from ftp, so that entirely depends on the server config. scp doesn't let you script passwords anyway.
# 4  
Old 05-09-2010
Jilagre,

You said I can still connect using ftp if I don't have wget installed. How I would use it? Should I try : ftp ftp.example.com? . I tried that , it didn't work. I would like to use ftp and get the file. I already have the username and the password. Thanks for your help.
# 5  
Old 05-10-2010
Quote:
Originally Posted by Pouchie1
Jilagre,

You said I can still connect using ftp if I don't have wget installed. How I would use it? Should I try : ftp ftp.example.com? . I tried that , it didn't work. I would like to use ftp and get the file. I already have the username and the password. Thanks for your help.
In what manner did it not work?
# 6  
Old 05-10-2010
Are you behind a firewall / proxy ? Is DNS client properly configured ?
# 7  
Old 05-10-2010
Yes , I am behind a firewall. But, the issue is what if I don't have the wget utility installed on my server? meaning, I cannot use the wget solution you provided. How can use ftp to download the file? I have the ftp server which is in the form of ftp.example.com and I also have the username and password and the directory the file is in.

Thanks a lot Jilagre
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update/Download file from FTP server to UNIX Server

HI Guys, I want to download files from FTP Server to my Unix server. I have tried , buy No Luck . Below Command i have tried. 1-Wget - Error "wget' not found" 2.ftp -n $HOST ...Not Working. 3.scp -i ftp://user:passowrd@hostname:21/ran/on/test.txt Any Suggestion (2 Replies)
Discussion started by: pareshkp
2 Replies

2. Shell Programming and Scripting

List the file names available on FTP server before selecting the required file

Below is my script code.which shows the environment name and then fetch the file from the ftp server but I am facing one issue.The script should be run in both way.We can pass the arguments with script and select the environment name then file name.Here the issue is I am not able to list the files... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies

3. 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

4. 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

5. 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

6. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

7. Shell Programming and Scripting

Shell script for FTP a file from one server to another server

Hi Can any one help me for script. I need a script and this script has to execute daily to move the files. FTP from one server to another server EX: Sep 10 06:24 abc.txt Sep 11 06.56 abc.txt Sep 12 08.23 abc.txt these files are located at a/b/c/e/f in 123 server and copy... (0 Replies)
Discussion started by: mahantysk
0 Replies

8. Shell Programming and Scripting

Dowloading a File from FTP Server to a local Server where User Id's are different

Hi, The Setup is like this. I'm connecting to Unix machine from my local machine. After connecting to Unix M/c, i need to connect FTP server. Am successful in connecting to FTP server, but am not able to download the file from the ftp server to my local machine. I have different user id's and... (1 Reply)
Discussion started by: ranjith_taurean
1 Replies

9. Shell Programming and Scripting

FTP a file to a remote Server

Dear all, I am trying to push a data file to a remote Server. I am taking date variable from the database. The file I want to push looks like this in /tmp hostname.export.beforedate.dmp.gz for reading the date from the database i have a file get_date.sql which contains select... (2 Replies)
Discussion started by: shivaraj
2 Replies

10. Shell Programming and Scripting

how to move a file from one server to another server using FTP in shell script?

I have a file --> file1.txt i need to copy this file to another server using FTP....the 2 servers are server1 and server2..may i know how to write a script that can do this? thanks in advance! Im a newbie to this... (4 Replies)
Discussion started by: forevercalz
4 Replies
Login or Register to Ask a Question