Re: [newbie] lost info in bash prompt

1999-07-19 Thread John Aldrich

On Sun, 18 Jul 1999, you wrote:
 
 Sooo, this is apparently where the prompt is defined. It 
 sure would be interesting to know who wrote the notation
 there-- anyone know if this is in a /etc/bashrc file
 in RedHat Linux?
 
I can confirm that it IS in RH 6.0. :-)



Re: [newbie] lost info in bash prompt

1999-07-19 Thread John Aldrich

On Mon, 19 Jul 1999, you wrote:

 I am not familiar with the /etc/skel directory that he mentions,
 and unfortunately I am away from my Linux system. But I strongly
 suspect it is just a "skeleton" directory to hold the basic
 files which each user can later customize-- the files will be
 copied to user homes as accounts are created...
 
This is correct.



Re: [newbie] lost info in bash prompt

1999-07-19 Thread Axalon


Hey my light may take a while to warm up but it does produce light. ;)
You have to watch those dot-files when doing backups cp -a does the trick

On Mon, 19 Jul 1999, pauljw wrote:

 Axalon wrote:
  
  Paul, whats your ~/.bashrc look like for the user you restored?
  
  snipped 
 
 Axalon,
 
 There wasn't one. I just copied the one in root's home directory, which
 has an 'if /etc/bashrc' statement in it apparently importing the
 contents of the one in /etc. I did this as root, logged back in as user
 and now I have the prompt I'd like to see.
 
 Thanks so much for your help. This has been a very good little excursion
 into configuration stuff I knew nothing about and now I have enough to
 be dangerous :-)
 
 I've bookmarked the configuration HOWTO html Richard posted and intend
 to read it at some length.
 
 -Paul-
 



Re: [newbie] lost info in bash prompt

1999-07-18 Thread Richard Myers


   On Sat, 17 Jul 1999, pauljw wrote:
I did some fiddling and had to put my home (user, not root) directory
back in place from a backup. Happily, everything worked save for the
bash prompt. It looks like: bash-2.03$. It used to show the user name
and the current directory. How can I get that back?
TIA,
-Paul-

On Sun, 18 Jul 1999, Richard Myers wrote:

I had a chance to explore the PS1 variable and the startup files in 
Linux. I found a very curious entry in a file called bashrc in the
/etc directory. This is the entire file:

-- 
# /etc/bashrc 
# System wide functions and aliases 
# Environment stuff goes in /etc/profile

# For some unknown reason bash refuses to inherit
# PS1 in some circumstances that I can't figure out.
# Putting PS1 here ensures that it gets loaded every time.

PS1="[\u@\h \W]\\$ "

alias which="type -path"
--

Sooo, this is apparently where the prompt is defined. It 
sure would be interesting to know who wrote the notation
there-- anyone know if this is in a /etc/bashrc file
in RedHat Linux?

Note that the same PS1 line appears in /etc/profile
so this variable is defined twice. No harm in that, the
last definition is used by the system.

Note that \$ gives a # if you are root, otherwise it
will print a $

I don't really like the results of the line

  PS1="[\u@\h \W]\\$ "

...because I (so far) haven't needed the hostname in my
prompt. Therefore I changed my prompt to:

  PS1="[ \W ] \u \\$ "

I think it is a bit less busy.

The normal order of startup that I am familiar with 
(that is, the order in which the files are read and
executed) would be:

  /etc/profile
  ~/.bash_profile

(where ~/ represents your home directory).

  ~/.bashrc

But with a /etc/bashrc file, the order is going
to be:

  /etc/profile
  /etc/bashrc
  ~/.bash_profile
  ~/.bashrc

(again, where ~/ represents your home directory).

Therefore, you can set global system variables (that is,
variables that are defined for all users) in the two
files in /etc, and these variables can (normally) be
redefined in the users' files.

QUESTION: What is the significance of the leading . in
.bash_profile and .bashrc ???

ANSWER: It prevents the file from being displayed by
the ls statement. To see these files (if they exist),
you have to use ls -a

This is to reduce clutter, and to protect these 
important system files from careless tampering.


best wishes,

richard myers



[newbie] lost info in bash prompt

1999-07-17 Thread pauljw

I did some fiddling and had to put my home (user, not root) directory
back in place from a backup. Happily, everything worked save for the
bash prompt. It looks like: bash-2.03$. It used to show the user name
and the current directory. How can I get that back?

TIA,
-Paul-



Re: [newbie] lost info in bash prompt

1999-07-17 Thread Axalon



On Sat, 17 Jul 1999, pauljw wrote:

 I did some fiddling and had to put my home (user, not root) directory
 back in place from a backup. Happily, everything worked save for the
 bash prompt. It looks like: bash-2.03$. It used to show the user name
 and the current directory. How can I get that back?
 
 TIA,
 -Paul-
 

Verify permissions and ownership of the files you moved