I need to download a file using wget, however I don't know exactly what the file name will be.
https://foo/bar.1234.tar.gz
According to the man page, wget lets you turn off and on globbing when dealing with a ftp site, however I have a http url.
How can I use a wildcard while using a wget? I'm using gnu wget.
Things I've tried.
/usr/local/bin/wget -r "https://foo/bar.*.tar.gz" -P /tmp
Update
Using the -A causes all files ending in .tar.gz on the server to be downloaded.
/usr/local/bin/wget -r "https://foo/" -P /tmp -A "bar.*.tar.gz"
Update
From the answers, this is the syntax which eventually worked.
/usr/local/bin/wget -r -l1 -np "https://foo" -P /tmp -A "bar*.tar.gz"
Best Answer
I think these switches will do what you want with
wget
:Example