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

Pause Current Thread
Hold ctrl and press z to pause the current thread. Run $fg to resume it.

aptitude easter eggs
this is a reference to Antoine de St. Exupery's "The Little Prince"

Virtual Console lock program
vlock command locks the current console by default. Also you can lock all the consoles on the server by using -a parameter. For details, pl man vlock. ps: Generally speaking , system will not install vlock programme . So you should use ' $ sudo apt-get install vlock ' to install vlock .

Display 16 largest installed RPMs in size order, largest first
Interesting to see which packages are larger than the kernel package. Useful to understand which RPMs might be candidates to remove if drive space is restricted.

Remove grep itself from ps
When you 'ps|grep' for a given process, it turns out that grep itself appears as a valid line since it contains the RE/name you are looking for. To avoid grep from showing itself, simply insert some wildcard into process' name.

An easter egg built into python to give you the Zen of Python

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.

get a desktop notification from the terminal
tired of switching to the console to check if some command has finished yet? if notify-send does not work on your box try this one... e.g. rsync -av -e /usr/bin/lsh $HOME slowconnection.bar:/mnt/backup ; z (now fire up X, do something useful, get notified if this stuff has finished).

Determine next available UID
Typical usage would be in a script that would want the next open UID in a range (in this case 500-600)

Show a Command's Short Description
The whatis command displays a short description for the command you list on the command line. It is useful to quickly learn what a command does


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: