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

Gentoo: Get the size of all installed packets, sorted
On a Gentoo system, this command will tell you which packets you have installed and sort them by how much space they consume. Good for finding out space-hogs when tidying up disk space.

Bring the word under the cursor on the :ex line in Vim
Very handy to bring the word currently under the cursor into a :s command in Vim. Example: If the cursor was on the word "eggs": :s/ ==> :s/eggs

Detect encoding of a text file
This command gives you the charset of a text file, which would be handy if you have no idea of the encoding.

Find installed network devices
Find installed network devices.

True Random Dice Roll

View ~/.ssh/known_hosts key information
Will return the SSH server key information for each host you have in your ~/.ssh/known_hosts file, including key size, key fingerprint, key IP address or domain name, and key type.

Prevent overwriting file when using redirection
If you set noclobber to on, bash won't allow redirection to overwrite existing files . $ set -o noclobber command turn the option on (default it s off ) . You can still append information but not overwrite the file .to turn it back off use : $ set +o noclobber . I use it because i overwrite a file by accident , after thought , content of the file was very important , creating a one more file mean nothing for my hard disk (we are not anymore on the 64 k memory time) , but content of file is far much important . What we call exeprience :(

search for text in files. recursive.
recursively search dir for a a particular file type, search each file for a particular text.

get cookies from firefox
useful to use after with the --load-cookies option of wget

Multi-segment file downloading with lftp
This is for files only, for directories 'mirror' has to be used.


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: