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

Convert ascii string to hex
Here's a version that uses perl. If you'd like a trailing newline: $ perl -pe 's/(.)/sprintf("\\x%x", ord($1))/eg; END {print "\n"}'

Remove all subversion files from a project recursively
This command will remove all .svn folder from your project if you need to manual remove the subversion files.

Put a console clock in top right corner
This puts a clock in the top right of the terminal. This version doesn't use tput, but uses escape codes

Add GPG key easy - oneliner
Replace KEY with GPG key. This command will load GPG key and add it to your system so you can use software from third party repos etc.

Extract title from HTML files
previous version leaves lots of blank lines

Find default gateway

Remove specific versions of old kernels (Ubuntu/Debian)
If, for example, you want to remove all kernels and headers but the last three versions, you can't use one of that magic all-in-one "remove old stuff" commands. With this simple but elegant command you can remove a range of versions, or a list of versions with e.g. {14,16,20}.

bypass any aliases and functions for the command
A simple directive which disables all aliases and functions for the command immediately following it. Shortcut for the bash built-in 'command' - "command linefoo". Think, {sic}...

Install pip with Proxy
Installs pip packages defining a proxy

Rotate a set of photos matching their EXIF data.
You need jhead package.


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: