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:
Use optimized sed to big file/stream to reduce execution time
sed '/foo/ s/foo/foobar/g' <filename>
insted of sed
if you want to replace "foo" with "bar" in all files in a folder, and put the resulting files into a new subfolder
Finds a string in files recursively below the current directory on systems without the "egrep" and its "-r" functionality.
You can also use sha1sum and variants for longer passwords
Alrighty, so I was really bored ;)
The taskkill command has the option of the curve, for a complete list just type: taskkill /? As we know, but to give a practical example, suppose you want to act only on the user's processes Cicciopalla use this command
notice symbol ` and ;
Might match "ping 192.168.0.1" and then run it.
Now all you have to do is replace user by your twitter username , pass by your password and the text inside status to whatever you wish to set your status too .
It uses cUrl library to post your messsage
combines mkdir and cd
added quotes around $_, thanx to flatcap!
when editing .bash_profile (or .bashrc), run this to use the new version without having to exit and open a new terminal
One time you logged in, you can prove these method just writing "firefox".
rename is a great command, but can't get it to work on mac.
if you lose your sound, this will restart alsa and you will get your sound back