1

I have a list of urls in a txt file. Each of these urls point to a page with another list of urls. What WGET command can I use to retrieve the urls from the pages that have been linked from the the urls in my txt file?

NOTE: I don't want to download files, but just output the list of urls to a txt file.

1

(untested):

wget -r -l 1 -i file

wgetcommand has many options... In this case:

  • -r stands for recursive
  • -l 1 means just one level of recursion (try 2 if one was not enough)
  • -i file means that file contains a list of staring point urls
  • 1
    Potential for +1 if you explain what that does – roaima Oct 31 '15 at 19:54
  • @roaima, yes: this needs an explanation... – JJoao Oct 31 '15 at 20:11
  • @JJoao This downloads files that have been linked from the txt file. I just want a list of the names of the urls to be output to another txt file. – user8547 Oct 31 '15 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.