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

rename all jpg files with a prefix and a counter

Extract audio from a video
With the -vn switch we make our intentions clear and ask FFmpeg not to bother itself with the video. Next we specify the audio codec copy, which tells FFmpeg to use the same codec to encode the audio, which it uses to decode it. To keep things simple, we'll just keep the sampling and bitrate values the same.

Create a DOS floppy image
mount with: mount -t msdos -o loop ./floppy.img /tmp/mnt

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

Print out your hard drive to a jet-direct compatible printer.
Where 192.168.1.2 is a printer with jet-direct. No, I don't suggest this as a backup method.

List all directories only.
Undocumented syntax, but should work on every shell. It'll list all directories in the current one. Change `*/` into globbing `**/` for recursivity.

Get the Volume labels all bitlocker volumes had before being encrypted
Get information of volume labels of bitlocker volumes, even if they are encrypted and locked (no access to filesystem, no password provided). Note that the volume labels can have spaces, but only if you name then before encryption. Renaming a bitlocker partition after being encrypted does not have the same effect as doing it before.

most used unix commands

output list of modifications for an svn revision
url can be a working copy or url to a svn repository, revision is any valid revision number for that branch.

Remove color codes (special characters) with sed
Removes ANSI color and end of line codes to the [{attr1};...;{attrn}m format.


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: