Commands by kkk (1)

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

Define shell variable HISTIGNORE so that comments (lines starting with #) appear in shell history
I was surprised to find that with RedHat bash, I could not find any comment lines (begining with #) in my bash shell history. Surprised because in Mageia Linux this works. It turns out that RedHat's bash will keep comment lines if in my .bashrc, I define: export HISTIGNORE=' cd "`*: PROMPT_COMMAND=?*?' Why have comment lines in shell history? It's a handy and convenient way to make proto-commands (to be completed later) and for storing brief text data that is searchable in shell history.

VMware Server print out the state of all registered Virtual Machines.
I use this command on my machines running VMware Server to print out the state of all registered Virtual machines.

Convert numbers to SI notation
converts any number on the 'stdin' to SI notation. My version limits to 3 digits of precious (working with 10% resistors).

Print text string vertically, one character per line.
Define a function $ vert () { echo $1 | grep -o '.'; } Use it to print some column headers $ paste

cpuinfo

List symbols from a dynamic library (.so file)
You can get what functions at which addresses are inside a dynamic link library by this tool.

Copy modification timestamp from one file to another.

Resolution of a image
You can use the -format switch to get the size of the image. Replace "logo:" with your image.

Generate Random Text based on Length

View a man page on a nice interface
A great way of viewing some man page while using gnome.


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: