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

Enable color pattern match highlighting in grep(1)
This will affect all invocations of grep, even when it is called from inside a script.

quickly formats a fat partition. usefull for flash drives

Search recursively to find a word or phrase in certain file types, such as C code
ack search recursively by default

git remove files which have been deleted
It deletes all removed files, updates what was modified, and adds new files.

Delete files older than..
This command will delete files i a given path (/dir_name) , which older than given time in days (-mtime +5 will delete files older than five days.

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

Multi-segment file downloading with lftp
This is for files only, for directories 'mirror' has to be used.

Find all dotfiles and dirs
find makes it easier, filtering . and .. maxdepth could be removed, finding entries recursively. Removing mindepth causes . to appear

List processes sorted by CPU usage

Show your current network interface in use


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: