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

list txt files order by time
list all txt files order by time, newest first

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Prints line numbers
If you don't have nl on your system, this achieves a similar effect, the default behavior in nl is to not number blank lines, but this does.

Skip to next selection in playlist
Uses process signal to play next selection

Check the age of the filesystem
Very useful set of commands to know when your file system was created.

gpg decrypt several files
Change directory (cd) to the directory where all your encrypted files are placed, and then run the command - then you are asked to insert your secret gpg password - ubuntu 8.04

Decrypt passwords from Google Chrome and Chromium.
Read this before you down voting and comment that it is not working -> Wont work on latest versions ~75> since database file is locked and has to be decrypted. This is useful if you have an old hdd with a chrome installation and want to decrypt your old passwords fast.

Get a funny one-liner from www.onelinerz.net
Put this command in .bashrc and every time you open a new terminal a random quote will be downloaded and printed from onelinerz.net. By altering the URL in the w3m statement you can change the output: 1 to 10 lines - http://www.onelinerz.net/random-one-liners/(number)/ 20 newest lines - http://www.onelinerz.net/latest-one-liners/ Top 10 lines - http://www.onelinerz.net/top-100-funny-one-liners/ Top 10 lines are updated daily.

run a command from within vi without exiting
":! ls -l " results in listing the files in the current directory. pressing "enter" will get you back into vi.

Slow Down Command Output
( Or $ ls -lat|lolcat -a if you like it in technicolor - apt install lolcat if needed )


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: