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

check open ports without netstat or lsof

Find the top 10 directories containing the highest number of files
It can be used to pinpoint the path(s) where the largest number of files resides when running out of free i-nodes

convert filenames in current directory to lowercase
This will convert filenames from uppercase to lowercase. I find this useful after downloading images from my digital camera. This works for English, but other languages may need something slightly more complex like this: $ for i in *; do mv "$i" "$(echo $i|tr [:upper:] [:lower:])"; done Also, the quote marks aren't necessary if your filenames don't contain spaces.

get a rough estimate about how much disk space is used by all the currently installed debian packages
The vaule is expressed in megabytes

Quickly CD Out Of Directories Without 5+ Aliases
I wrote this a long time ago, wondering why this wasn't floating around somewhere out there (at least not where I could find).. this seems much more simple than multiple aliases and can cd out of directories easier.

Get all possible problems from any log files
Using the grep command, retrieve all lines from any log files in /var/log/ that have one of the problem states

print character classes
Today I needed a way to print various character classes to use as input for a program I was writing. Also a nice way to visualize character classes.

IBM AIX: Extract a .tar.gz archive in one shot

Convert (almost) any video file into webm format for online html5 streaming
If you're using the experimental vorbis encoder (homebrew version of libffmpeg)

check open ports without netstat or lsof


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: