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

print text in color red
eg: $printTextInColorRed foo bar foo bar [in red color]

Generate a random password 30 characters long
The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible. Human-memorable passwords are never going to be as secure as completely completely random passwords. [from pwgen man page]

ssh autocomplete based on ~/.ssh/config
I sue this in my .bashrc file This will also do auto-completion for scp and sftp

Binary digits Matrix effect
Silly Perl variant.

Find Duplicate Files (based on size first, then MD5 hash)
If you have the fdupes command, you'll save a lot of typing. It can do recursive searches (-r,-R) and it allows you to interactively select which of the duplicate files found you wish to keep or delete.

Display condensed log of changes to current git repository
Assuming you are working within a git repository, you can run the above command & see what has changed in reverse chronological order, with one commit per line. Other formatting variations to 'oneline' include 'short', 'medium', 'full', 'fuller', 'email' or 'raw'.

Install pip with Proxy
Installs pip packages defining a proxy

graphical memory usage
smem is very clever, it keeps in mind shared memory in its calculations!!! http://www.selenic.com/smem/

Lists installed kernels
no need for rpm, no need for piping to another command. also no real fu but lacking in unnecessary complexity and distro specific commands.

connects to a serial console
e.g., 'screen -L /dev/ttyUSB0 38400' listens to your Holux M-241 GPS logger and turns on automatic logging


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: