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

Summarise the size of all files matching a simple regex
Use the find command to match certain files and summarise their total size in KBytes.

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

Insert the last argument of the previous command

(DEBIAN-BASED DISTROS) Find total installed size of packages given a search term
Replace \-dev with whatever you wanna search for

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

Bash command to convert IP addresses into their "reverse" form

return a titlecased version of the string[str.title() in python]

Remind yourself to leave in 15 minutes
If you spend most of your time in front of the terminal, leave is a useful reminder. Leave can have absolute form: leave 1555 reminds you to leave at 3:55PM

List all symbolic links in current directory that matches regexp
Perl alternative to list symlinks with a clumsy regexp filter: place the regex instead of he example 'libxml' and end it with a wildchar to see the results (previous cd on dir). Is it possible change the '-l' test for '-d' and it will search for directories. [Same applies for -x and -X. See $(perldoc -f -x) for more tests]. I use it quite often when dealing with shared libraries...

floating point operations in shell scripts
-l auto-selects many more digits (but you can round/truncate in your head, right) plus it loads a few math functions like sin().


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: