Commands by CoolHand (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

remove execute bit only from files. recursively

Create a tar of directory structure only
The original suggestion did not work for me, when operating on folders located on an external mount (ie other than the root device) in Ubuntu. A variation using xargs does the trick.

Show top committers for SVN repositority for today

Erase empty files
The command find search commands with size zero and erase them.

Sort by IP address

Verbosely delete files matching specific name pattern, older than 15 days.

Search back through previous commands
Searches backwards through your command-history for the typed text. Repeatedly hitting Ctrl-R will search progressively further. Return invokes the command.

move you up one directory quickly
In bash, this turns on auto cd. If a command is just a directory name, it cd's into that directory.

Disable the ping response
It really disables all ICMP responses not only the ping one. If you want to enable it you can use: $ sudo -s "echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all"

Show all detected mountable Drives/Partitions/BlockDevices
Yields entries in the form of "/dev/hda1" etc. Use this if you are on a new system and don't know how the storage hardware (ide, sata, scsi, usb - with ever changing descriptors) is connected and which partitions are available. Far better than using "fdisk -l" on guessed device descriptors.


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: