Commands using grep (1,935)

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

Prints total line count contribution per user for an SVN repository
make usable on OSX with filenames containing spaces. note: will still break if filenames contain newlines... possible, but who does that?!

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Build an exhaustive list of maildir folders for mutt
Of course, you can adjust "Maildir" to your config...

Number of open connections per ip.
Here is a command line to run on your server if you think your server is under attack. It prints our a list of open connections to your server and sorts them by amount. BSD Version: $ netstat -na |awk '{print $5}' |cut -d "." -f1,2,3,4 |sort |uniq -c |sort -nr

Install pip with Proxy
Installs pip packages defining a proxy

removing syncronization problems between audio and video
This assumes that there is a 10.2 sec delay between the video and the audio (delayed). To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie

drill holes on image

Disco lights in the terminal
Looks best in an 80x24 256-color terminal emulator.

Display a list of all PHP classes that are called statically
Searches all .php files for a static instantiation of a class and displays the class names along with their frequencies.

search for a file in PATH


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: