Category Archives: cli

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.

Take a screenshot of a remote desktop in Linux

If you want to take a screenshot of a remote Linux desktop, all you need is to change the command below to match the remote desktop you wish to take a screenshot of: DISPLAY=”:0.0″ import -window root screenshot.png

Use locate across external devices in Linux

By default, updatedb indexes only your root partition when run. To be able to extend locate‘s reach and get updatedb to index external devices such as USB harddisks and flash drives, edit the /etc/updatedb.conf file. Modify the following line: PRUNEPATHS=”/tmp /var/spool /media” so that it reads PRUNEPATHS=”/tmp /var/spool” This adds the devices mounted in theā€¦ Read More »