I am trying to download all the links from aligajani.com. There are 7 of them, excluding the domain facebook.com which I wan't to ignore. Yes, so that means, I don't want to download links that start with facebook.com domain. Also, I would want them saved in a .txt file, line by line. So there would be 7 lines. Here's what I've tried so far. This just downloads everything. Don't want that.wget -r -l 1 http://aligajani.com
How do I use wget to download all links from my site and save to a text file?
wget
wget does not offer such an option. Please read its man page.You could use lynx for this:lynx -dump -listonly http://aligajani.com | grep -v facebook.com > file.txtFrom its man page:   -listonly          for -dump, show only the list of links.