Projekt

Allgemein

Profil

Aktionen

Howto wget

wget is used to retrieve files via http or ftp protocol.

preliminary note

this is an excerpt from http://www.gnu.org/software/wget/manual/wget.html

FTP usage

get all files from ftp-server recursive:

wget -r --ftp-user=FTPUSERNAME --ftp-password='secret-code' ftp://ftp.example.com

by default the max. recursive level is 5

if you need to transfer deeper directory structures (e.g. 20 levels) use:

wget -r -l 20 --ftp-user=FTPUSERNAME --ftp-password='secret-code' ftp://ftp.example.com

if you want to transfer the files to a specific directory use:

wget -P /tmp -l 2 --ftp-user=FTPUSERNAME --ftp-password='secret-code' ftp://ftp.example.com

if you want to transfer the files without the generation of 'server_name/...' directory-structure consider using the cut and nH-options

double check with http://www.gnu.org/software/wget/manual/wget.html#Directory-Options

wget -nH --cut-dirs 2 -P /tmp -l 2 --ftp-user=FTPUSERNAME --ftp-password='secret-code' ftp://ftp.example.com

Von Jeremias Keihsler vor etwa 7 Jahren aktualisiert · 2 Revisionen