MagicalTux wrote: > Hello, > > I'm working a lot on website mirroring from various hosting companies, > and I noticed that usually, hidden files aren't shown by default when > "LIST"ing a directory. > This result in some files (.htaccess/.htpasswd) not being mirrored. > > I did an hugly hack for my personnal needs, and have a wget-all binary > which sends "LIST -a" instead of "LIST", but it would be nice to have a > new option to wget, like --ftp-list-options (or whatever). > > By default, the same old behaviour would be used, but when passing > --ftp-list-options=-a it would result in having the -a option passed to > LIST. This option is not supported by all FTP servers, but most of those > used nowadays accept it, and usually require it to display "hidden" > files. > > I had a look at the wget sourcecode, but I don't know it enought to > write a patch for that, and I don't either have the time to check for > the way to add a new option to wget. > > By the way this option should also alter globbing's LIST, making it > possible to run something like wget 'ftp://server.tld/path/to/.ht*'
your --ftp-list-options proposal is actually very interesting, although perhaps a little bit too low-level. we were thinking about changing wget's default behavior by trying LIST -la before LIST when downloading from an ftp site. however, i don't like the approach of hardcoding the "-la" option in wget, so i personally prefer your proposal. i would like to read other users' opinion before deciding which course of action to take, though. -- Aequam memento rebus in arduis servare mentem... Mauro Tortonesi http://www.tortonesi.com University of Ferrara - Dept. of Eng. http://www.ing.unife.it GNU Wget - HTTP/FTP file retrieval tool http://www.gnu.org/software/wget Deep Space 6 - IPv6 for Linux http://www.deepspace6.net Ferrara Linux User Group http://www.ferrara.linux.it