[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: looking for "wget"-like utility with "find"-like search



Robert P. J. Day wrote:
[snip]
  what would be nice would be to say, go to
ftp://sources.redhat.com/pub/gcc, and recursively search for a file
with a given name.  if you find it, bring it back.  (even better would
be to allow wildcards, so i could say, go get
"gcc-3.4.3.{tar.bz2,tar.gz,tgz}".  whichever one you find first, grab
it and that will do nicely.

Hmmm... Have you attempted something like:


wget -r -nd -A gcc-3.4.3.tar.gz ftp://sources.redhat.com/pub/gcc
wget -r -nd -A gcc-4.0-20041205.tar.bz2 ftp://sources.redhat.com/pub/gcc

I don't know if wget supports extended globbing. If it does, something like '-A gcc-3.4.3.*(tar.bz2|tar.gz|tgz)' might just work (but it would download all three of them, probably not what you wanted). Maybe using @(tar.bz2|tar.gz|tgz) instead... not sure... play with it and see ;-)

--
Aleksandar Milivojevic <amilivojevic pbl ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]