[Plain]View PlainCopy
- Wget-nh-m--ftp-user=your_username--ftp-password=your_password ftp://your_ftp_host/*
Explain:
-NH: Do not create a directory named after the host name.
–cut-dirs: Want to remove the original directory layer, starting from the root directory to calculate. If you want to completely preserve the original directory structure of FTP, do not add this parameter.
-m: Download all subdirectories and keep the directory structure.
–FTP-USER:FTP User Name
–ftp-password:ftp Password
FTP://*.*.*.*/*:FTP host address. Finally, you can download the specified directory with the directory name.
Example:
[Plain]View PlainCopy
- Wget-nh-m--ftp-user=tom--ftp-password=123456 ftp://192.168.19.1/tom/
Of course, if the number of files in the FTP directory is particularly large, the most efficient way is to first compress the package before downloading. There is no way, just use the above method to download it automatically.
Linux wget Download the entire FTP directory (including subdirectories)--Reproduced