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

Prepend a text to a file.
Syntax: $ prepend content to add [filename] Uses ed, so no temp files created.

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

List bash functions defined in .bash_profile or .bashrc
If you issue the "set" command, you'll see a list of variables and functions. This command displays just those functions' names.

colorize your svn diff
Will colorize your svn diff.

Write and read HDD external
Write and read HDD external FreeBSD

find out zombie process
$8~osstat, $2~pid, $11~cmd

Open (in vim) all modified files in a git repository
The option --porcelain makes the output of git easier to parse. This one-liner may not work if there is a space in the modified file name.

Create a CD/DVD ISO image from disk.

See system users

HTTP Get of a web page via proxy server with login credentials
If you are behind a proxy server and have to authenticate with proxy server to browser web pages then you have to pass proxy server address and its port number along with user credentials to curl to got GET the page using curl. Example : "curl -U srikanth -x 167.85.103.70:8080 http://www.yahoo.com". In case you don't specify the password (as in the above example), curl will prompt to enter the password at the command line.


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: