Command Line Tools
The "domain information groper" tool. More advanced then host... If you give a hostname as an argument to output information about that host, including it's IP address, hostname and various other information.
For example, to look up information about “www.amazon.com” type:
dig -x 22.214.171.124
This will look up the address (which may or may not exist) and returns the address of the host, for example if that was the address of “http://slashdot.org” then it would return “http://slashdot.org”.
(now BW whois) is used to look up the contact information from the “whois” databases, the servers are only likely to hold major sites. Note that contact information is likely to be hidden or restricted as it is often abused by crackers and others looking for a way to cause malicious damage to organisation's.
wget can also retrieve multiple files using standard wildcards, the same as the type used in bash, like *, [ ], ?. Simply use wget as per normal but use single quotation marks (' ') on the URL to prevent bash from expanding the wildcards. There are complications if you are retrieving from a http site (see below...).
wget --spider --force-html -i bookmarks.html
wget -r -l1 --no-parent -A.gif http://www.website.com
This will download (recursively), to a depth of one, in other words in the current directory and not below that. This command will ignore references to the parent directory, and downloads anything that ends in “.gif”. If you wanted to download say, anything that ends with “.pdf” as well than add a -A.pdf before the website address. Simply change the website address and the type of file being downloaded to download something else. Note that doing -A.gif is the same as doing -A “*.gif” (double quotes only, single quotes will not work).
curl is another remote downloader. This remote downloader is designed to work without user interaction and supports a variety of protocols, can upload/download and has a large number of tricks/work-arounds for various things. It can access dictionary servers (dict), ldap servers, ftp, http, gopher, see the manual page for full details.
curl -u username:password http://www.placetodownload/file
curl -T file_name ftp://ftp.uploadsite.com
curl -C - -o file http://www.site.com
Leave a Reply
You must be logged in to post a comment.