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

Monitor connection statistics with netstat and watch

one-liner mpc track changer using dmenu
Add a [fluxbox] binding in your key file then this command provides a dmenu selector for the next track to play

Exclude .svn, .git and other VCS junk for a pristine tarball
~$ tar --version tar (GNU tar) 1.20

Get current stable kernel version string from kernel.org
depends on "jq" This is more reliable in my opinion.

Remove Backup Files
Remove all text backup files.

resolve short urls
since the most url shorteners respond with a header containing the Location: ... this works with most common shorteners

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

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.

Disco lights in the terminal

Recursively grep thorugh directory for string in file.
Print line numbers also, so you don't have to search through the files once its open for the string you already grepped for.


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: