Commands by dr3s (1)

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

Execute most recent command containing search string.
Execute the most recent command containing search string. This differs from !string as that only refers to the most recent command starting with search string.

Detect encoding of a text file
This command gives you the charset of a text file, which would be handy if you have no idea of the encoding.

Show changed files, ignoring permission, date and whitespace changes
Only shows files with actual changes to text (excluding whitespace). Useful if you've messed up permissions or transferred in files from windows or something like that, so that you can get a list of changed files, and clean up the rest.

Get length of current playlist in xmms2

Mount Fat USB with RWX
after that, you can launch bash script in your usb drive in FAT32.

Create a thumbnail from a video file

find all active IP addresses in a network
There are several other options. This one is plain and simple. Another option is: nmap -sP 192.168.0.0/24

count and number lines of output, useful for counting number of matches
Write each FILE to standard output, with line numbers added. With no FILE, or when FILE is -, read standard input.

Sort specific lines while editing within vi
Sort lines within vi editor. In this example sort lines 33-61 and lines 4-9 asciibetically.

list files recursively by size


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: