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 alias is useful if you need to use some text often. Executing the alias will copy the text into your clipboard and then remove it after X seconds.
No need $_ netp ;)
since we're repeating the command there after the semicolon, we only need one backtick
If you use colored ls(1), the broken symbolic links significantly differ from regular files and directories in the ls listing. In my case it is bright red. 0 is for getting the first place in the list.
works only in zsh, requires EXTENDED_GLOB to be set.
list all files are greater than 10mb
Using egrep to search multiple patterns.
Sets the Open Firmware to ask for password when selecting a boot volume other then the hd
sudo apt-get install bb
A demoscene intro in ascii art with tracker song
If you need to randomize the lines in a file, but have an old sort commands that doesn't support the -R option, this could be helpful. It's easy enough to remember so that you can create it as a script and use that.
It ain't real fast. It ain't safe. It ain't super random. Do not use it on untrusted data. It requires bash for the $RANDOM variable to work.
searches through the linux dictionary for the word you're trying to spell (you can use regular expressions, e.g. "< /usr/share/dict/words egrep bro[c]+o[l]+i" )
This zips a directory recursively but excludes some directories within the zipped directory. Useful for excluding .svn and .git directories, or compilation targets.
If your version of curl does not support the --compressed option, use
curl -s http://funnyjunk.com | gunzip
curl -s --compressed http://funnyjunk.com
-dither FloydSteinberg produces a more uniform dither than the default.
Forward local UDP port to remotetarget via ssh.
helpful when you see something like this:
zsh: argument list too long: cp
This command will use grep to read the shortcut (which in the above examle is file.url), and filter out all but the only important line, which contains the website URL, and some extra characters that will need to be removes (for example, URL=http://example.com). The cut command is then used to get rid of the URL= at the beginning. The output is then piped into Firefox, which should interpret the it as a web URL to be opened. Of course, you can replace Firefox with any other broswer. Tested in bash and sh.