Download data from ftp.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Download data from ftp.
# 1  
Old 09-03-2010
Download data from ftp.

Dear all,
I am beginner to shell scripting.
I have to download more than 1k files from ftp site.
link is below
ftp://ftp.ncbi.nih.gov/genomes/Bacteria/

Earlier i was using wget url, for download but the problem is some times folder names get changed, i don't know how to move in directories in the script (list of directories is not available). After entering in every directory i want to download files ending with ".fna" extension.

Please help me Smilie
# 2  
Old 09-03-2010
I would suggest you see about using lftp, possibly within your shellscript.

It has an interesting feature named "mirror", specifically where you can recurse directories and download files matching a glob pattern, such as "*.fna"

LFTP - sophisticated file transfer program

HTH
dan
# 3  
Old 09-04-2010
Any other suggestions ???

Smilie
# 4  
Old 09-06-2010
There is an example here of downloading all .gif files using a cludge in wget. Might fit your requirement.

Wget Manual - Examples
# 5  
Old 09-13-2010
Dear admax;
kindly post a written example for your requirement.

BR
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to Download File from FTP

Hi, I am trying to download files from FTP using below FTP code. x=$(TZ=CST date +%Y%m%d) host='xxx.xx.xxx.xxx' user='userX' pass='Password' echo "Connecting to FTP Host -- $host....." echo $x a=$(ftp -v -n -i << ! open $host user "$user" $pass cd /rose/yellow/ mget... (6 Replies)
Discussion started by: rramkrishnas
6 Replies

2. Shell Programming and Scripting

FTP File download

Hi, I have few files at FTP location and have written a script to download the same from ftp based on the sysdate - 1, however with the below code I am unable to download the files from FTP. x=`TZ=CST+24 date +%Y%m%d` mget Daily_BIH_$x_NEW.tar.gz can anyone please help me in... (10 Replies)
Discussion started by: rramkrishnas
10 Replies

3. Shell Programming and Scripting

Need of shell script to download data using ftp

Hi ! I am just wondering shell script to download data from ftp... I have text file containing ftp address...looks like this ftp://site...../filename.xyz ftp://site...../filename.xyz ftp://site...../filename.xyz ftp://site...../filename.xyz script has to read ftp address and... (8 Replies)
Discussion started by: nex_asp
8 Replies

4. Shell Programming and Scripting

Help on FTP download using UNIX script

Hi guys, I'm new on this forum and on UNIX. Can somebody help in writing a script to download a file from an FTP server and validating if there is a file to download. If there is a file, I would send it to a mail recipient and if not I would generate an error log. Thanks in advance!:D (1 Reply)
Discussion started by: rjay_45
1 Replies

5. UNIX for Dummies Questions & Answers

cURL Active FTP Download

Hello, I know this is probably a very silly question for most but how to do I force curl to do active FTP downloads? Thank you Dallas (2 Replies)
Discussion started by: Dallasbr
2 Replies

6. Shell Programming and Scripting

download specified file from ftp server

Hi all, I'm having problems downloading files from ftp server. I have to download only those files that name starts with YYYYMMDD.But file comes like the format "20080624221035.TXT".Also how i can get list of all file names with in specified folder. Here i paste my code ftp -vn... (1 Reply)
Discussion started by: vaskarbasak
1 Replies

7. UNIX for Dummies Questions & Answers

FTP Download username and password

I am trying to download from ftp server (rsync and postfix). But every time I connect to the ftp server, it prompts for USER and PASS but I don't know which username and and password to use. And I am using command based UNIX OS. (2 Replies)
Discussion started by: kumarrana
2 Replies

8. HP-UX

ftp download problem

from windows ftp tool even you are not root user you can delete root files (8 Replies)
Discussion started by: mkhsy
8 Replies

9. HP-UX

Ftp Download Problem

FROM WINDOWS , WHILE GETTING DATA FROM HP-UNIX SERVER USING FTP, I AM ABLE TO GET DATA ONLY LESS THAN 4GB FILE, PLZ HELP ME HOW TO GET MORE MORE THAN 4GB FILE. (4 Replies)
Discussion started by: niranjan
4 Replies

10. SuSE

When a FTP download is completed

I receive files by FTP in an input directory. Every 10 seconds a process checks if some new file has arrived to the input directory and then the process moves them to another directory to be read by a second process. The problem is that there is no way to know if the download has finished... (11 Replies)
Discussion started by: Javi
11 Replies
Login or Register to Ask a Question