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

Get top N files in X directory
You can simply run "largest", and list the top 10 files/directories in ./, or you can pass two parameters, the first being the directory, the 2nd being the limit of files to display. Best off putting this in your bashrc or bash_profile file

convert unixtime to human-readable

Generate a playlist of all the files in the directory, newer first
I use this to generate a playlist with all the podcasts I listen to. Ordered from most recent to older.

Get version of loaded kernel module
Returns the version of the kernel module specified as "MODULENAME", when available.

See system users

Find out what the day ends in
Several people have submitted commands to do this, but I think this is the simplest solution. It also happens to be the most portable one: It should work with any sh or csh derived shell under any UNIX-like OS. Oh by the way, with my German locale ($LC_TIME set appropriately) it prints "g" most of the time, and sometimes (on Wednesdays) it prints "h". It never prints "y".

stop windows update
Windows only: stops windows update and the nagging restart window. You need your admin password for this one.

stderr in color
in case you run some command in CLI and would like to take read strerr little bit better, you can use the following command. It's also possible to grep it if necessary....

Mute speakers after an hour
Mutes the speakers after an hour, in case you fall asleep watching a video...

create a colorful 田 image


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: