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

list files recursively by size

Replace Every occurrence of a word in a file
Replace 'this' with 'that'

reset Mageia urpmi media sources to network only
On Mageia (and Mandriva) Linux, this command will clear your existing urpmi configuration and configure it to use only network sources. It can be useful after you have installed from CD/DVD and don't want to continually be prompted to insert CD/DVD each time you install a package. acknowledgement: blino

Find default gateway

Generat a Random MAC address
Generate a random MAC address with capital letters

Retrieve a random command from the commandlinefu.com API
Seeing that we get back plain text anyway we don't need lynx. Also the sed-part removes the credit line.

restart apache only if config works
making lots of configurations to apache and restarting the server only to find it broken just plain sucks.

Find all directories on filesystem containing more than 99MB
Finds all directories containing more than 99MB of files, and prints them in human readable format. The directories sizes do not include their subdirectories, so it is very useful for finding any single directory with a lot of large files.

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"

OSX: Hear pronunciation of a word
I often use this command to learn pronunciation of unfamiliar words.


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: