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

Convert all .flac from a folder subtree in 192Kb mp3
find . -type f -iname '*.flac' # searches from the current folder recursively for .flac audio files | # the output (a .flac audio files with relative path from ./ ) is piped to while read FILE; do FILENAME="${FILE%.*}"; flac -cd "$FILE" | lame -b 192 - "${FILENAME}.mp3"; done # for each line on the list: # FILE gets the file with .flac extension and relative path # FILENAME gets FILE without the .flac extension # run flac for that FILE with output piped to lame conversion to mp3 using 192Kb bitrate

list block devices
Shows all block devices in a tree with descruptions of what they are.

Colorize matching string without skipping others
this is useful to highlight only some code without losing other lines (eg. software, logs, scripts)

batch crop images whit ImageMagick
Just starting to get in love with mogrify.

svn diff colorized
If colordiff utility installed, it is sometimes handy to call this command. Of course, you should create an alias for it. E.g. svndiff.

Remove the first character of each line in a file

Insert a comment on command line for reminder
Comments can be used directly on the command line so I can save in the history a brief description of what command does.

Runs a command without hangups.
puts command in background and sends its output to nohup.out file it will not die if you log out fromyour shell session ;-)

get you public ip address
Relies on ifconfig.me functioning. It's about as easy as it gets, and memorable to old geeks too.

Backup all MySQL Databases to individual files


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: