I want to download a whole directory from my FTP server, and it can be done by using wget
with -m
option.
wget -m --ftp-user=aaaa --ftp-password=bbbb ftp://xxx.xxx.xxx.xxx/dir
However, I noticed that .listing
files are created under all directories, and I don't want these files. I learned that wget
has the option --no-remove-listing
, but it seems there is no option to do the opposite. Is it possible to mirror directories without creating the .listing
files? Or, is there any better tool than wget
?
Best Answer
There's no need for such option. You just don't use
--no-remove-listing
. In your case this option is implicitly set because of-m
.From
man 1 wget
:Conclusion: instead of
-m
use equivalent options without--no-remove-listing
, i.e.-r -N -l inf
:Another approach:
curlftpfs
(withcp
or whatever). See this answer of mine.