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

Remove all old kernels
http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot

Git diff last two commits
How about this one ?

Ruby - nslookup against a list of IP`s or FQDN`s
This version uses host and no ruby.

Donwload media from *.rm from an url of type htttp://.../*.ram

list block devices
Shows all block devices in a tree with descruptions of what they are.

Creates PodFeeds.txt, a file that lists the URLs of rhythmbox podcasts from the rhythmdb.xml file.
The first grep any line with pod-feed in it plus the following five lines. The second grep throws out any line not containing . sed removes the leading four spaces then and the trailing . Using a colon as sed's separating character avoids having to escape the /. Works ok with Mythbuntu 9.04 (used mostly as a three line bash script).

Force an fsck on reboot
Force an fsck on reboot. Useful on a system where / has mounted read-only because of file system issues.

exec chmod to subfiles
Using `-exec cmd {} +` causes find to build the command using all matching filenames before execution, rather than once per file.

List the size (in human readable form) of all sub folders from the current location
Simple and easy to remember. -h is human, -d1 = depth 1. disk usage, human, depth 1

Save a file you edited in vim without the needed permissions
Calls sudo tee like all the other lines, but also automatically reloads the file. Optionally you can add command Wq :execute ':W' | :q and command WQ :Wq to make quitting easier


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: