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

Open screen on the previous command
I often find myself wanting to open screen on whatever command I'm currently running. Unfortunately, opening a fresh screen session spawns a new bash session, which doesn't keep my history, so calling screen directly with the previous command is the only way to go.

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Execute a command before display the bash prompt
For example, if you are the type who type ls very often, then $ PROMPT_COMMAND=ls will ls after every command you issue.

Run the last command as root
this command also can run the last command as root what's more, sudo !-2 can run the second last command as root , and so on

Dock Thunderbird in system tray and hide main window
Dock Thunderbird in system tray and hide main window. Very useful for startup scripts. Of course you can dock any app of your choice.

list block devices
Shows all block devices in a tree with descruptions of what they are.

BourneShell: Go to previous directory
cd - would return to the previous directory of your cd command. NB: previous dir is always stored in $OLDPWD variable.

copy partition table from /dev/sda to /dev/sdb

Command line progress bar
This command tar?s up a directory and sends the output to gzip, showing a rate of 223MB/s. This may require you installing the pv command. For debian based users out there: $ sudo aptitude install pv

SVN script for automatically adding and deleting files


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: