On 21:14 23 Jan 2002, John P Verel <[EMAIL PROTECTED]> wrote:
| I frequently su from my user account to root.  According to the su info,
| it starts a new interactive shell, leaving the environment unchanged.
| 
| What I'd like to do is:
| 
|       su to root
|       pick up root's path
|       pick up user's history file
|       not change directory to ~/root, but keep the current directory
| 
| Can I do all this? Doing the first two is easy, especially by just
| invoking su as a login shell.  But I can't figure how to do the last
| two.

su root -c ". /etc/profile; . /root/.bash_profile; export HISTFILE=$HISTFILE; exec 
bash -i'

Cheers,
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

Thousands of years ago the Egyptians worshipped cats as gods.
Cats have never forgotten this. - David Wren-Hardin <[EMAIL PROTECTED]>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to