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

Quick searching with less

Ultimate current directory usage command
Based on the MrMerry one, just add some visuals to differentiate files and directories

put current directory in LAN quickly
This works on all versions of python 2.X. Tested on Linux and bundled python versions on Mac OSX and Solaris / UNIX Note: Serves globally on port 8000. Ctrl+c to stop. Don't start the server and leave it on a internet connected machine. :)

AWK: Set Field Separator from command line

drop first column of output by piping to this
An advantage is that this doesn't modify remained string at all. One can change {0,1} with {0,n} to drop several columns

Move all comments the top of the file in vim
Python comments begin with a #. Modify to suit other languages. Other uses: Instead of m0 use m$ for end of file or d for deleting all comments.

vim insert current filename
insert filename Normal mode: "%p Insert mode: %

Remove everything except that file
Remove everything except that file with shell tricks inside a subshell to avoid changes in the environment. $ help shopt

Delicious search with human readable output
You can install filterous with $ sudo apt-get install libxslt1-dev; sudo easy_install -U filterous

list files recursively by size


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: