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

find all active IP addresses in a network

Print the last modified file

Show your current network interface in use

Check if a string is into a variable
Returns true (0) if the string is into $var, or false (1) if not.

Twit Amarok "now playing" song
Share your "now playing" Amarok song in twitter!

convert png into jpg using imagemagick

recursively change file name from uppercase to lowercase (or viceversa)
easier way to recursively change files to lowercase using rename instead

Find brute force attempts on SSHd
Searches the /var/log/secure log file for Failed and/or invalid user log in attempts.

List open sockets protocol/address/port/state/PID/program name

Filter the output of a file continously using tail and grep
The OPs solution will work, however on some systems (bsd), grep will not filter the data, unless the --line-buffered option is enabled.


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: