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

archlinux: check which repository packages have updates available
Shows which packages from the official repositories (not aur) have updates available. For most accurate output, the mirrors and package lists should be up to date.

Show in a web server, running in the port 80, how many ESTABLISHED connections by ip it has.
The command could show you all conecctions if you skip "grep ESTABLISHED"

Find the package that installed a command

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Set a user password without passwd
Slightly shorter. It doesn't create a subprocess either.

Go up multiple levels of directories quickly and easily.
Change to your taste. Much quicker than having to add 'cd' every time. Add it to your .bashrc or .bash_profile.

List the files any process is using
List the files a process is using.

pretend to be busy in office to enjoy a cup of coffee
Not as taxing on the CPU.

Start a quick rsync daemon for fast copying on internal secure network
"Sample output" shows a minimalistic configuration file.

Undo several commits by committing an inverse patch.
Use this to make a new commit that "softly" reverts a branch to some commit (i.e. squashes the history into an inverse patch). You can review the changes first by doing the diff alone.


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: