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

How to know the total number of packages available

extracts 64 bytes of random digits from random lines out of /dev/random sent to stdio
Use this the next time you need to come up with a reasonably random bitstring, like for a WPA/WPA2 PSK or something. Takes a continuous stream of bytes coming from /dev/urandom, runs it through od(1), picking a random field ($0 and $1 excluded) from a random line and then prints it.

burn an ISO image to writable CD
Does life get much easier? Read up about wodim for an understanding of its origins in relation to the older `cdrecord` utility

Retry the previous command until it exits successfully

Print all the lines between 10 and 20 of a file
Subtly different to the -n+p method... and probably wrong in so many ways....... But it's shorter. Just.

command! -nargs=1 Vs vs <args>
Because entering ':' requires that you press shift, sometimes common command-line / mini-buffer commands will be capitalized by accident.

list block devices
Shows all block devices in a tree with descruptions of what they are.

Create thumbnails and a HTML page for listing them (with links to sources)
The input images are assume to have the "JPG" extension. Mogrify will overwrite any gif images with the same name! Will not work with names with spaces.

convert from hexidecimal or octal to decimal
Bash can accept '0x' and '0' notation for hexidecimal and octal numbers, so you just have to output the values.

archlinux: shows list of files installed by a package
Shows the files which the package, for example gvim, installed on your system.


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: