4 ms·
Not at all. Though following redirects and not using the original "file" name by default may be a bad idea. The whole purpose of wget is to get a file from the
by andrewstuart2 10y ago
Not at all. Though following redirects and not using the original "file" name by default may be a bad idea. The whole purpose of wget is to get a file from the web and store it locally, by default using the remote filename in the working directory.
- raimue 10y agoIt is important to make a difference between a remote filename supplied in a Content-Disposition header or the substring that can be extracted from the given URL by splitting at slashes. wget by default uses the latter, appending the QSA (?foo=bar) even when not intended. Same behavior for `curl -O`. You have to use `wget --content-disposition` or `curl -O -J` to explicitly trust the filename send by the server.