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

Suspend an ssh session.
This must be typed before any other characters have been entered on the line. Use fg, as usual, to resume the ssh session.

Display formatted routes

list files recursively by size

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.

take a screenshot of a webpage

NSA codename generator
nsacodenamegenerator dot com is no more outputs random two words together in capital letters

Big Countdown Clock with hours, minutes and seconds
Figlet is easy to find for download on the internet, and works for any text. Quite cool.

extract email adresses from some file (or any other pattern)
find all email addresses in a file, printing each match. Addresses do not have to be alone on a line etc. For example you can grab them from HTML-formatted emails or CSV files, etc. Use a combination of $...|sort|uniq$ to filter them.

Edit your command in vim ex mode by <ctrl-f>
If you are in ex mode in vim i.e. you've pressed ':'. You can edit the current command by pressing <ctrl-f>

SAR - List the average memory usage for all days recorded under '/var/log/sa/*' using sar -r.


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: