POSIX (UNIX, Linux, BSD, Max OS X etc.)

Posted by Jeet Sukumaran

(Several) dozens of terminal windows/tabs open at the same time? Me too. Gets confusing trying to find a particular shell sometimes. Snow Leopard introduced a feature that allows you to set a specific title for each of your Terminal windows, but to do it you have to use the mouse/GUI. Ugh.

Here is a solution that not only is mouse/GUI free, it actually works across platforms. Source (or add) the following into your .bashrc:

Posted by Jeet Sukumaran
We have all done it before. Idiotic actions that result in catastrophic results (usually in conjunction with "sudo"). Some more than others. Have you ever tried clearing out some directory using "sudo rm -rf *", and then realized you were actually in the root directory? What about "sudo rm -rf .*", in the mistaken impression all you are going to being is to blow away hidden files in the current directory?