Thursday, December 17, 2009

Cocoa Butter For Blemishes

Read web site in offline mode with wget

When all the time working in the console, it can happen that you wish to change the shell prompt. This prompt may look like sth like:
    cfred tuxhost @: / var / log $
sometimes it happens only in the depths of the directory that just make untenable the view of the current path in the prompt. In this case, simply change the definition of the prompt that is in the PS1
cfred tuxhost @: / var / log $ SAVE = $ PS1
cfred tuxhost @: / var / log $ PS1 = "\\ u: \\ W $"
cfred: $ log echo "To restore the original value so it will suffice to"
cfred: log $ SAVE = $ PS1
 There are several escape characters that can be used as an example: 
\\ d for the date
\\ h the name of the host to the first point (no dns suffix)
\\ H name the full host
\\ t the time in 24h HH: MM: SS
\\ T the time in 12h format HH: MM: SS
\\ u the current username
\\ w the full path to the current directory
\\ W
the current directory list is available on the doc bash

0 comments:

Post a Comment