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

Google Spell Checker
http://immike.net/blog/2007/04/07/hacking-google-spell-checker-for-fun-and-profit/

get the ascii number with bash builtin printf

Generate list of words and their frequencies in a text file.

Stat each file in a directory
Possible simplification of egrep-awk-sort with find and -exec with xargs.

Show a git log with offsets relative to HEAD
Print a git log (in reverse order) giving a reference relative to HEAD. HEAD (the current revision) can also be referred to as HEAD~0 The previous revision is HEAD~1 then HEAD~2 etc. . Add line numbers to the git output, starting at zero: $ ... | nl -v0 | ... . Insert the string 'HEAD~' before the number using sed: $ ... | sed 's/^ \+/&HEAD~/' . Thanks to bartonski for the idea :-)

Replace spaces in filenames with underscores
It's the rename-tool from debians perl-package.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Track flight information from the command line
See the flight information from the CLI Use as a SH file or function, like: `./flight.sh os 336`

Analyze, check, auto-repair and optimize Mysql Database
A useful way to do a full check and auto repair damaged databases

list files recursively by size


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: