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

Length of longest line of code
Here's an awk version.

Shortcut to find files with ease.
It looks for files that contains the given word as parameter. * case insensitive * matches files containing the given word.

Use Linux coding style in C program
put "-linux" option into $HOME/.indent.pro to make it default

Print a monthly calendar with today's date highlighted
The cal command is handy, but sometimes you want to quickly see today's date highlighted. That's why I came up with this quick command. Much like http://www.commandlinefu.com/commands/view/1342/show-this-months-calendar-with-todays-date-highlighted but cleaner and more succinct.

Google Translate
Usage: $ translate Example: $ translate hello en es See this for a list of language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

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.

take a look to command before action
add |sh when you agree the list, I often use that method to prevent typos in dangerous or long operations

Convert all files *.mp4 to *.mpeg using ffmpeg (Windows Cmd line)
Note: %~nI expands %I to a file name only (cf. http://technet.microsoft.com/en-us/library/bb490909.aspx)

Convert all MySQL tables and fields to UTF8
This loops through all tables and changes their collations to UTF8. You should backup beforehand though in case some data is lost in the process.

Find files with lines that do not match a pattern
This one would be much faster, as it's only one executed command.


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: