Excluding certain file types in wget
- by Alan Spark
I have been using wget for a while now to mirror files from an ftp server to a local folder. My wget command is as follows:
wget -mirror -w 1 -p -nH -P /var/www/ ftp://my-ftp-server
However, I just noticed that it is copying over a .listing file for every folder that it visits. So, even if nothing has been changed on the ftp server, a .listing file will always be copied.
My understanding is that the .listing file is created when wget opens the ftp session. Is there a way to avoid this?
I've tried the -R option (e.g. -R .listing) but this didn't help. See: http://www.gnu.org/software/wget/manual/wget.html#Recursive-Accept_002fReject-Options
Thanks,
Alan