How do I download all files starting with a specified name with wget?
For example, I have the link .
There are the following files:
myFile_01_02.txt
myFile_01_03.txt
myFile3
yourFile
File1
secondFileSo, for example, I want to download all the files that starts with myFile. I read the help for the wget command but I didnt find anything useful. How can I do this?
1 Answer
As pointed out in the comments by @ivanivan, the -A (--accept) series of options must be used in conjunction with the -m (mirror) or -r (recursive) options. Therefore, interpreting your example command, the command you would likely want would be e.g. wget -m -nd -A "myFile_*_*.txt" (where -nd places all the matching files in a single directory rather than e.g. /).