Commands by unixmonkey9199 (1)

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

grep processes list avoiding the grep itself
Trick to avoid the form: grep process | grep - v grep

disable caps lock
a quick one-line way to disable caps lock while running X.

Git diff last two commits
How about this one ?

Colored status of running services
Replace service --status-all 2>&1 by service --status-all 2>/dev/null to hide all services with the status [ ? ]

Check the status of a network interface

Find all files containing a word
This command will find all files recursively containing the phrase entered, represented here by "searchphrase". This particular command searches in all php files, but you could change that to just be html files or just log files etc.

Cap apt-get download speed
apt-get is pretty aggressive when it downloads, potentially hogging the bandwidth of your network. The 25 is in KB, change this to your needs.

Print all git repos from a user
in case you could afford installing jq

Solaris get PID socket
Command line to get which PID is opening a socket on IP and PORT. Only useful under Solaris.

check the status of 'dd' in progress (OS X)
Sends SIGINFO to the process. This is a BSD feature OS X inherited. You must have the terminal window executing dd selected when entering CTRL + T for this to work.


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: