Category Archives: Networking

Extract a tarball online without local saving

This can be a real saver if you are using an EeePC with very low disk space. Say you want to download a large file but you don’t want to save it locally because you don’t have the necessary disk space. Do a wget -qO – “http://www.site.com/archive.gz” | tar zxvf –

Quickly query Wikipedia by using the Linux CLI

Stuck at a CLI prompt in Linux and not sure what Romania is? Use the following command: dig +short txt Romania.wp.dg.cx Subsitute Romania for any other keyword you might want to see a short description of in your command line.

Check your unread GMail e-mails using the Linux command line

All you need to display your latest GMail messages in the command line is this one-liner: curl -u username:password –silent “https://mail.google.com/mail/feed/atom” | tr -d ‘\n’ | awk -F ‘<entry>’ ‘{for (i=2; i<=NF; i++) {print $i}}’ | sed -n “s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 – \1/p” Substitute username:password with your GMail username and password.

Display the current directory as a webpage in Linux

Do you want to quickly serve a directory to your friends over the web or LAN? There are plenty of applications out there that let you do this, but in Linux all you really need is Python installed.Do a python -m SimpleHTTPServer in the directory you wish to share, then access http://127.0.0.1:8000 in your browser.