commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
You can put this into your shell sourced file like .bashrc or .zshrc to have a different mysql prompt.
See http://dev.mysql.com/doc/refman/5.1/de/mysql-commands.html for more informations.
Beware that currently with mysql 5.5 the seconds are buggy and won't be displayed if you put this into a .cnf file. With the enironment variable this will work.
(This may be specific to bash only.) This transforms the current working directory to all uppercase characters and replaces forward slashes with backslashes, prepending the string with "C:" and appending a single ">". It serves no practical purpose, but may serve as a great practical joke if you can insert it to some victim's .bashrc :-)
This one eliminates the additional backslash at the end (which is not necessary)
I use this command (PS1) to show a list bash prompt's special characters. I tested it against A flavor of Red Hat Linux and Mac OS X
blue and yellow colored bash prompt for a Hanukkah celebration on your box
For example, if you are the type who type ls very often, then
will ls after every command you issue.
It colors the machine name and current directory different colors for easy viewing.