Category Archives: cli

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.

Monitor your changed files in real-time in Linux

Everybody knows top or htop. Ever wished there was something similar but to monitor your files instead of CPU usage and processes? Well, there is.Run this: watch -d -n 2 ‘df; ls -FlAt;’ and you’ll get to spy on which files are getting written on your system. Every time a file gets modified it will… Read More »

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.

Record your Linux desktop from the command line

If you do not wish to install a dedicated application for recording your desktop, you can do it with this one-liner: ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /home/user/out.mpg All you need is have ffmpeg already installed (and most systems do). Navigate to /home/user and you’ll find you MPEG video file there.