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:
Get the IP address of all your network cards.
Just copy and paste the code in your terminal.
Note : sudo apt-get for debian versions , change as per your requirement .
Source : www.h3manth.com
when editing .bash_profile (or .bashrc), run this to use the new version without having to exit and open a new terminal
-v invert-match : invert the sense of matching, to select non matching lines
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.
Parsing the output of ls is never a good idea for any reason. Using find this way:
- works with files that have spaces in their names.
- actually lists "sub folders" and not of all files and folders.
- does not break if there are a huge number of files in the current directory.
this lets you edit a crontab file (which may be used as a backup as well) and insert this into your crontab. this way is especially handy, when multiple users are working on one account (e.g. root)
shorthand for sudo save
Found in comments section works on most Linux flavors.
just change SELINUX=enforcing to SELINUX=permissive, and you're done. Reboot if you want to prove it.
This is a nice way to kill processes.. the example here is for firefox!!! substitute firefox for whatever the process name is...
You need curl.. and a Mac of course.
This decompresses the file and sends the output to STDOUT so it can be grepped. A good one to put in loops for searching directories of gzipped files, such as man pages.