Am using wget for download files from ftp.
Ftp folder have name /var/www/html/
Inside this folder is located tree of folders & files, ~20 levels.
Am trying make ftp download (have no ssh access), of this all with wget.
wget -- recursive -nv --user user --password pass ftp://site.tld/var/www/folder/
This one command runs Ok. But it creates an folder structure.
~/back/site.tld/var/www/html/my-files-and-folders-here
Question:
Is any possibility - to say wget, not create ~/site.tld/var/www/html/ but make all tree, in current folder?
i.e. ~/back/my-files-want-here/ I.e. - to trim/cut certain path?
Thanks
Look for --no-host-directories
and --cut-dirs
in the manpage.
This should work like expected (maybe you have to increase/decrease cut-dirs):
wget --recursive --no-verbose --no-host-directories --cut-dirs=3 --user user --password password ftp://site.tld/var/folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With