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

Add all unversioned files to svn

check open ports without netstat or lsof

du and sort to find the biggest directories in defined filesystem
This command give a human readable result without messing up the sorting.

SMTP Analysis
This works just as well for SMTP. You could run this on your mail server to watch e-mail senders and recipients: tcpdump -l -s0 -w - tcp dst port 25 | strings | grep -i 'MAIL FROM\|RCPT TO'

Create a persistent remote Proxy server through an SSH channel
Create a persistent remote Proxy server through an SSH channel.

determine if tcp port is open

Delete a file/directory walking subdirectories (bash4 or zsh)

Kills a process that is locking a file.
Useful when you're trying to unmount a volume and other sticky situations where a rogue process is annoying the hell out of you.

bypass any aliases and functions for the command
A simple directive which disables all aliases and functions for the command immediately following it. Shortcut for the bash built-in 'command' - "command linefoo". Think, {sic}...

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows


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: