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

Check if x509 certificate file and rsa private key match
A x509 certificate and a rsa key file have in common a parameter called modulus, it is a very long hexadecimal number. That value is unique for each certficate / key pair. The command allows to do the check of this pair of values in a script using a great feature of bash. "

quick input
Insert the last argument to the previous command

Quick access to the ascii table.

Convert a flv video file to avi using mencoder

To get the CPU temperature continuously on the desktop
No need for a colon, and one less semicolon too. Also untested.

Display top 5 processes consuming CPU

Recover username and password for Technicolor TC7200 admin page (vulnerability)
The router Technicolor TC7200 has an exploit where the file http://192.168.0.1/goform/system/GatewaySettings.bin is open for unauthenticated access. Even though it is binary, the 2 last strings are the username and password for the pages for router management. It can be read using the 'strings' command, 'hexdump -C' or a hexadecimal editor. (default user/password = admin/admin) Reveals more configuration, including SSID name and Key for the wifi network: $wget -q -O - http://192.168.0.1/goform/system/GatewaySettings.bin Hexadecimal dump of the file: $wget -q -O - http://192.168.0.1/goform/system/GatewaySettings.bin | hexdump -C

Colorize svn stat
Use color escape sequences and sed to colorize the output of svn stat -u. Colors: http://www.faqs.org/docs/abs/HTML/colorizing.html svn stat characters: http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.ref.svn.c.status GNU Extensions for Escapes in Regular Expressions: http://www.gnu.org/software/sed/manual/html_node/Escapes.html

draw honeycomb
$ tput setaf 1 && tput rev && seq -ws "___|" 81|fold -69|tr "0-9" "_" && tput sgr0 $ $ # (brick wall)

Averaging columns of numbers
This example calculates the averages of column one and column two of "file.dat". It can be easily modified if other columns are to be averaged.


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: