All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands


Check These Out

Show errors in the kernel ring buffer
Much more useful then parsing syslog

Auto Rotate Cube (compiz)
Strip my code to: wmctrl -o 0,0 # autorotates to the first face. In fact [0-1279],0 wmctrl - 1280,0 # goes to the second face wmctrl -o 2560,0 # goes to the third face, and so on. # Use multiples of the horizontal display resolution. My example work for 1280x800 display, been 1280 the number of interest. Tweak the number, try a biiiig one and see your cube spinning... I put a complex example to show how fun things can be, even for my ademco and paradox alarm central network advisor interface xpto etc. It rotates two faces, print the alarm message, and goes back tho where it was. Tested on BIGLINUX 4.2, equivalent to ubuntu LTS hardy. Do not forget to activate 3D efects ( compiz cube )

Pulls email password out of Plesk database for given email address.
This simply pulls the password out of the database for the given mail name for ease of use in testing emails that you would not normally have access to.

Terrorist threat level text
This line provides the same result by reading the output of a less arbitrary value. This is a personal choice on the matter, and the result on different machines may vary.

GRUB2: set Super Mario as startup tune

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

Rename .JPG to .jpg recursively
Recursively rename .JPG to .jpg using standard find and mv. It's generally better to use a standard tool if doing so is not much more difficult.

run remote linux desktop
First of all you need to run this command. X :12.0 vt12 2>&1 >/dev/null & This command will open a X session on 12th console. And it will show you blank screen. Now press Alt + Ctrl + F7. You will get your original screen. Now run given command "xterm -display :12.0 -e ssh -X user@remotesystem &". After this press Alt + Ctrl + F12. You will get a screen which will ask you for password for remote linux system. And after it you are done. You can open any window based application of remote system on your desktop. Press Alt + Ctrl + F7 for getting original screen.

how to find the active X (X11/xorg) username and DISPLAY variable
Requires consolekit (works in e.g. Ubuntu). Here x11-display is DISPLAY

List available upgrades from apt (package names only)
Usefull if you only want to see the package names, or if you want to use them in a script.


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: