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

Cryptographically secure 32-bit RNG in strict ZSH
ZSH ships a couple random number generators via the $RANDOM environment variable and rand48() via zsh/mathfunc, but neither are cryptographically secure. This code produces a 32-bit random number suitable for cryptography. It's only dependency is /dev/urandom and it does not rely on any shell commands or 3rd party utilities. It assumes ZSH was compiled with 64-bit integer support.

Live filter a log file using grep and show x# of lines above and below

List manually installed packages (excluding Essentials)

Change to $HOME - zsh, bash4
To change to $HOME in that manner you need to set a shell option. In zsh it is auto_cd, hence $ setopt -o auto_cd in bash4 it is autocd, hence $ shopt -s autocd What the option does is allow you to cd to a directory by just entering its name. This also works if the directory name is stored in a variable: $ www=/var/www/lighttpd; $www sends you to /var/www/lighttpd. CAUTION: If a command or function name identical to the directory name exists it takes precedence.

Show a prettified list of nearby wireless APs

list files recursively by size

record the input of your sound card into ogg file
save the input into a ogg file

Convert flv without re-encoding

Remote mysql dump all databases with ssh

Create md5sum of a directory


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: