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

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

Stage only portions of the changes to a file.

Join lines
It's works only when you replace '\n' to ONE character.

Number of CPU's in a system
/proc/cpuinfo contains information about the CPU. Search for "processor" in the /proc/cpuinfo file wc -l, counts the number of lines.

See system users

Pronounce an English word using Merriam-Webster.com
The original was a little bit too complicated for me. This one does not use any variables.

Yet Another Rename (bash function)
Implementation of `rename` for systems on which I don't have access to it.

Check if network cable is plugged in and working correctly
with 'mii-tool -w eth0' you can watch the interface for changes of the link status

Check to make sure the whois nameservers match the nameserver records from the nameservers themselves
Change the $domain variable to whichever domain you wish to query. Works with the majority of whois info; for some that won't, you may have to compromise: domain=google.com; for a in $(whois $domain | grep "Domain servers in listed order:" --after 3 | grep -v "Domain servers in listed order:"); do echo ">>> Nameservers for $domain from $a

Print the IPv4 address of a given interface


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: