Commands by kamathln (10)

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 the package that installed a command

Repeatedly purge orphaned packages on Debian-like Linuxes
Upgraded Debian/Ubuntu/etc. systems may have a number of "orphaned" packages which are just taking up space, which can be found with the "deborphan" command. While you could just do "dpkg --purge $(deborphan)", the act of purging orphans will often create more orphans. This command will get them all in one shot.

Display top 5 processes consuming CPU

Display top Keywords from history

purge all packages marked with 'rc'
After you install/remove lots of packages, there are many packages marked with 'rc'. This script help you to purge these packages, it will save some spaces from your disk.

automatically ditch old versions in a conflict
This is not exactly a commandline, but a vim macro to automatically ditch the "old" version of a conflict when dealing with the naster

pipe output of a command to your clipboard
In turn you can get the contents of your clipboard by typing xsel by itself with no arguments: $ xsel This command requires you to install the xsel utility which is free

Copy uncommitted changes from remote git repository
Copy changed files from remote git repository, _including binary ones_, staged and unstaged alike. Note that this command doesn't handle deleted files properly.

ssh autocomplete
Stop tormenting the poor animal cat. See http://sial.org/howto/shell/useless-cat/. Edit: replaced $ sort | uniq by $ sort -u

Sort files in folders alphabetically
Creates one letter folders in the current directory and moves files with corresponding initial in the folder.


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: