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 default gateway

How to stop MAC Address via IPTables
edit the /etc/sysconfig/iptables file and try to work whit this: -A INPUT -i (interface) -m mac (mac address) -j ACCEPT/DROP

View all new log messages in real time with color
This will show all changes in all log files under /var/log/ that are regular files and don't end with `gz` nor with a number

Quick find function
A function that allows you to perform a case-insensitive search in the current directory, and directories in the current directory (but no further), for files containing the first argument anywhere in their names.

list files in mtime order
Simple but useful; list files in the current directory in mtime order. Useful if you've been working on something and then take a day or two off.

Massive change of file extension (bash)
Change the file extension in batch. Useful to create output file names with same input name but distinct extension by including logic inside the loop

Install pip with Proxy
Installs pip packages defining a proxy

List all authors of a particular git project
This should work even if the output format changes.

processes per user counter
enumerates the number of processes for each user. ps BSD format is used here , for standard Unix format use : ps -eLf |awk '{$1} {++P[$1]} END {for(a in P) if (a !="UID") print a,P[a]}'

hard disk information - Model/serial no.
Get the hard disk information with out shutting down and opening the system. It gives information on model no., serial no., cylinders/heads/sectors, and the supported features of the hard disk.


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: