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

Produce a pseudo random password with given length in base 64
Don't copy trailing '=' or use head -c to limit to desired length.

Sort installed rpms by decreasing size.
It's all said in the title.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

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

Run a command if today is the last day of the month
This is handy to just shove into a daily cron entry. If you do use cron, make sure to escape the %d with \%d or it will fail.

Merge some PDF files into a single one

Check if a domain is available and get the answer in just one line
Returns nothing if the domain exists and 'No match for domain.com' otherwise.

Prefix command output with duration for each line
Prefixes each output line with time between it and the previous one.

easily strace all your apache processes
This version also attaches to new processes forked by the parent apache process. That way you can trace all current and *future* apache processes.

phpinfo from the command line
show phpinfo(); from 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: