I have been trying to get wget to download all files to a specific directory. I tried the -O option but I get
/home/user/xml/: Is a directory
This is what I have so far
wget -m --user=user --password=pass -r -l1 --no-parent -A.rss ftp://localhost/public_html/I need to download all .rss files from ftp to a specific directory on my secondary server.
2 Answers
use -P option.
wget -P /home/user/directory_you_want http:url_you_are_downloading_fromSee more at : Stackoverflow page
0The -P option downloaded all the files to the specific directory however it created 2 new directories inside the target directory.
So the files went into /home/user/xml/192.168.1.1/public_html/
So I tried it with the -P option and the -nd option and it worked the way I needed it to.
The final code looks like this
wget -m -nd --user=user --password=password -r -l1 --no-parent -A.rss ftp://localhost/public_html/ -P /home/user/Desktop/xml/