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

[vim] Clear trailing whitespace in file
% acts on every line in the file. \s matches spaces. \+ matches one or more occurrences of what's right behind it. Character '$' matches end-of-line.

pretend to be busy in office to enjoy a cup of coffee
Create a progress dialog with custom title and text using zenity.

Sniff ONLY POP3 authentication by intercepting the USER command
dsniff is general purpose password sniffer, it handles *lots* of different protocols, but it also handles tcp-style expressions for limiting analyzed traffic - so I can limit it to work on pop3 only.

Shows the torrent file name along with the trackers url
Replace * with any filename matching glob or an individual filename

find files in a date range
Find files in a specific date range - in this case, the first half of last year. -newermt = modification time of the file is more recent than this date GNU find allows any date specfication that GNU date would accept, e.g. $ find . -type f -newermt "3 years ago" ! -newermt "2 years ago" or $ find . -type f -newermt "last monday"

Quick notepad
Quick write some notes to a file with cat. Ctrl+C when you have finish.

google tts

a function to find the fastest DNS server
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.

Random quote from Borat
I improved a bit on the original by only using sed and extracting the quote with a matching group. Use -nE for sed on Mac OSX Use -nr for sed on Linux. Warning! The quotes from Borat are definitely offensive.

SHA256 signature sum check of file
get the SHA256 sum signatur for a file


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: