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

Generate a random left-hand password
Generates a random 8-character password that can be typed using only the left hand on a QWERTY keyboard. Useful to avoid taking your hand off of the mouse, especially if your username is left-handed. Change the 8 to your length of choice, add or remove characters from the list based on your preferences or kezboard layout, etc.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

mplayer -vo aa foo.mpg
mplayer -vo caca will give you a similar result but in color

Factory reset your harddrive. (BE CAREFUL!)

Get information about memory modules
To take information about the characteristics of the installed memory modules.

Reset hosed terminal,
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.

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

Shows cpu load in percent
This version is precise and requires one second to collect statistics. Check sample output for a more generic version and also a remote computer invocation variant. It doesn't work with the busybox version of the 'top' command but can be adjusted

print file without duplicated lines usind awk
show file withou duplicated lines

resume scp-filetransfer with rsync
resume a partial scp-filetransfer with rsync


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: