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

Add all unversioned files to svn
No need for grep, let awk do the match. This will not behave properly if the filenames contains whitespace, which is awk's default field separator.

Rename files in batch

check open ports without netstat or lsof

pretend to be busy in office to enjoy a cup of coffee
The first parameter after timeout is the key parameter; number of seconds to wait. With a 6 you have 600 seconds for your coffee break (10min).

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

Fibonacci numbers with awk
recursive version, "pure" AWK

Override and update your locally modified files through cvs..

search ubuntu packages to find which package contains the executable program programname
search ubuntu's remote package source repositories for a specific program to see which package contains it

Are the two lines anagrams?
This works by reading in two lines of input, turning each into a list of one-character matches that are sorted and compared.

Prettify an XML file
Like `tidy`, `xmllint` can be used to prettify XML files. The --nsclean option is also useful to remove redundant namespaces.


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: