Re: [CentOS] root .bash_profile?

The following one liner should display root's home directory:

grep -w ^root /etc/passwd | cut -d: -f6

Which finds the line beginning with the word root, and returns the sixth entry (the home directory of that entry).


The $home of root is /root, just copy it there.

<a href=";d=DwIGaQ&amp;c=Ftw_YSVcGmqQBvrGwAZugGylNRkk-uER0-5bY94tjsc&amp;r=Tou2GfskafF_UnC0yPjAjEzLDhbALx-0EDoLp3_iSss&amp;m=BtGUZ97pcKOFG7bhNzhabJQysuxxWgjVQIWf3J07Wj8&amp;s=ugp8dpIHA9dciXeJwCp2QajbDnF239ydtrHUdQtebNU&amp;e=" title=";d=DwIGaQ&amp;c=Ftw_YSVcGmqQBvrGwAZugGylNRkk-uER0-5bY94tjsc&amp;r=Tou2GfskafF_UnC0yPjAjEzLDhbALx-0EDoLp3_iSss&amp;m=BtGUZ97pcKOFG7bhNzhabJQysuxxWgjVQIWf3J07Wj8&amp;s=ugp8dpIHA9dciXeJwCp2QajbDnF239ydtrHUdQtebNU&amp;e=">;d=DwIGaQ&amp;...</a>

This message contains information which may be confidential and privileged. Unless you are the intended recipient (or authorized to receive this message for the intended recipient), you may not use, copy, disseminate or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail, and delete the message. Thank you very much.