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

Counts number of lines
Counts number of lines of code in *.h and *.cc files

Find default gateway

Super Speedy Hexadecimal or Octal Calculations and Conversions to Decimal.
^Hexadecimal Ten minus Octal Ten is Eight(in Decimal). $ echo "$(( 0xaf )) = $(( 0257 ))" ^Hexadecimal AF and Octal 257 are both Decimal 175.

Extract public key from private
This will extract the public key that is stored in the private key using openssl.

Check SATA link speed.
Check SATA controller type. 6.0 Gbps - SATA III 3.0 Gbps - SATA II 1.5 Gbps - SATA I

Show all current listening programs by port and pid with SS instead of netstat

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"

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Using Git, stage all manually deleted files.
-u tells git to automatically stage all changes to files in the index (eg. deleted and modified files). See: http://stackoverflow.com/questions/1402776/how-do-i-commit-all-deleted-files-in-git http://kernel.org/pub/software/scm/git/docs/git-add.html

Show the key code for keyboard events include the Fn keys
The keycodes are a result of pressing: Mute (Fn+F1) a


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: