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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
This command is adapted from http://otomaton.wordpress.com/2012/12/26/find-broken-symbolic-links/
don't work when the link is a loop, an error message is printed.
Create an AES256 encrypted and compressed tar archive.
User is prompted to enter the password.
openssl enc -d -aes256 -in <file> | tar --extract --file - --gzip
Unlike other alternatives, this command only relies on bash builtins and should also work on windows platforms with the bash executable.
Sparseness corresponds to the number 128 and can be adjusted. To print all possible digits instead of only 0 and 1 replace RANDOM%2 by RANDOM%10 or RANDOM%16 to add letters [A-F].
Like `tidy`, `xmllint` can be used to prettify XML files.
The --nsclean option is also useful to remove redundant namespaces.
tr has some predefined sets of characters that are more convenient to use than characters codes
The option --porcelain makes the output of git easier to parse.
This one-liner may not work if there is a space in the modified file name.
The XML document can be transformed to text, XML, HTML or anything else. The --stringparam option allows to set XSL variables externally.