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

Extract icons from windows exe/dll
wrestool can be found in icoutils (http://www.nongnu.org/icoutils)

Get a list of the erroring cifs entries in fstab
It disturbs me when my logwatch report tells me a share or machine has disappeared, esp as mount isn't telling me what's gone. This command outputs to stderr the erroring cifs entries from fstab.

List the popular module namespaces on CPAN
Grabs the complete module list from CPAN, pulls the first column, ditches html lines, counts, ditches small namespaces.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

check open ports without netstat or lsof

List all commands present on system
List all commands present on system by folder. $PATH contains all command folder separated by ':'. With ${PATH//:/ }, we change ':' in space and create a list of folder for ls command.

append empty line after every line in file.txt

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

Get Hardware UUID in Mac OS X
Formats the output from `ioreg` into XML, then parses the XML with `xmllint`'s xpath feature.

List the size (in human readable form) of all sub folders from the current location
Tested on MacOS and GNU/Linux. It works in dirs containing files starting with '-'. It runs 'du' only once. It sorts according to size. It treats 1K=1000 (and not 1024)


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: