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:
Shows all available keyboard bindings in bash. Pretty printing.
Fetches latest stable release version from first entry between tags
Checks for syntax errors in PHP files modified in current working copy of a Git repository.
Creates a temporary ram partition
to make a 3gb partition (Defaults to 1gb)
-c will count the number of times your search matches in the file.
Kills all processes with a certain string. This was done to kill all ssh sessions openned by zenoss which look like: usr/bin/ssh /opt/zenoss/bin/zenmodeler
If you run dpkg --clear-selections or have otherwise selected installed packages for deinstall, but want to undo it, run this. It will set all installed packages back to installed status so that they won't be removed by commands like "dpkg -Pa"
netstat will list all open ports on the system, unix sockets, tcp sockets and udp sockets. the t flag limits to tcp ports the l flag limits to listening ports and the n flag disables the translation of port to service ( ie :25 displayed instead of :smtp ). then grep for the port you are interested in preceeded by a colon.
Processes biglion quantity of sold ebay coupons/bonus codes, so you can know approximate count of users who buyed the coupons and when sales are come up again.
You can change sleep parameter so script will work slowly or faster (default is 5 seconds).
Additional requirements: curl
Standart tools used: awk, date, cat, grep (bash)
Access www.kernel.org and download the last stable linux kernel release.
Replace "foo" with "bar" in all files in current directory recursively
"git grep" automatically excludes untracked files (e.g. compiler output) and files under .git directory. If no directory or file is given, it will recursively search through the current directory.
This command will delete all files and folders except 'skipme'. it could be a file or a folder.