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:
Just a little simplification.
This will deal nicely with filenames containing newlines and will run one lzma process per CPU core. It requires GNU Parallel http://www.youtube.com/watch?v=OpaiGYxkSuQ
Really, you deserve whatever happens if you have a whitespace character in a file name, but this has a small safety net. The truly paranoid will use '-i'.
Essentially the same as funky's alias, but will not traverse filesystems and has nicer formatting.
Gnu grep allows to restrict the search to files only matching a given pattern. It also allows to exclude files.
I like this better than some of the alternatives using -exec, because if I want to change the string, it's right there at the end of the command line. That means less editing effort and more time to drink coffee.
The above output is for a custom compiled version of Vim on Arch Linux.
Just a quick shell one liner, and presents a list of all the enabled and disabled (those prefixed with a '-') features.
Query the Socrata Open Data API being used by the White House to find any employee's salary using curl, grep and awk.
Change the value of the search parameter (example uses Axelrod) to the name of any White House staffer to see their annual salary.
Quicker way to search man pages of command for key word
A Quick variation to the latest commands list with the new-lines skipped. This is faster to read.
I use this sometimes when ctags won't help.
I've been using it in a script to build from scratch proxy servers.
I use zgrep because it also parses non gzip files.
With ls -tr, we parse logs in time order.
Greping the empty string just concatenates all logs, but you can also grep an IP, an URL...
This should do the same thing and is about 70 chars shorter.
The ^python$ is a package name patten. You can change whatever you want.
-P tells grep to use perl regex matches (only works on the GNU grep as far as I know.)
The cut should match the relevant timestamp part of the logfile, the uniq will count the number of occurrences during this time interval.