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

Create the directoty recursively

When feeling down, this command helps
$ sudo apt-get install sl $ man sl

Getting a domain from url, ex: very nice to get url from squid access.log

Debug your makefile
Say your dependencies specified in your Makefile (or dates on your source files) is causing 'make' to skip some source-files (that it should not) or on the other other end, if it is causing make to always build some source-files regardless of dates of target, then above command is handy to find out what 'make' thinks of your date v/s target date-wise or what dependencies are in make's view-point. The egrep part removes the extra noise, that you might want to avoid.

Convert the output of one or more (log, source code ...) files into html,
Requires the "enscript" package. frank@zappa:~# sudo apt-get install enscript Or http://www.codento.com/people/mtr/genscript/ "use your head"

search user defined function in c language

Rename files in batch

display date of last time a process was started in `date` format
STARTED Mon Oct 18 04:02:01 2010

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

Kill a process by its partial name
pkill is a standard command and kills processes Byte part of their name.


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: