commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
some numbers have strange output!
some numbers output nothing!
some numbers will kill your terminal! even logout when running in tty
but i don't know why! can anyone explain it to me?
use it to add a random boolean switch to your script
use it to stagger cronjob or to get a random number
increase the range by replacing 100 with your own max value
This command is useful for searching through a whole folder worth of pdf files.
Creates a git repository in a predefined location.
git gc should be run on all git repositories every 100 commits. This will help do do so if you have many git repositories ;-)
How much memory is chrome sucking?
Well, this is quite useful for testing if your hardware watchdog is working properly.
POSIX compliant arithmetic evaluation.
list all java process info.
Replace the first part of the command above with the appropriate timezone string. Eg: 'Europe/London' or for UTC - 'Etc/UTC'. The appropriate string can be found from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
This is useful when your server is installed by a data centre (managed hardware, VPS, etc) and the timezone is not usually set to the one your prefer.
Shows a list of all installed cows saying a fortune. Also lists the cows names. Pic your favorite cow!
Needs cowsay, fortune and ruby installed. The path only applies to OS X with cowsay installed using homebrew. On Linux it might be /usr/share/cowsay/cows/ or similar. Uses ruby just because.
Anyone can make the command smaller & easier? :)