DevHeads.net

Postings by Peda, Allan (NYC-GIS)

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).

Hi,

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

Nux!
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nux.ro&amp;d=DwIGaQ&amp;c=Ftw_YSVcGmqQBvrGwAZugGylNRkk-uER0-5bY94tjsc&amp;r=Tou2GfskafF_UnC0yPjAjEzLDhbALx-0EDoLp3_iSss&amp;m=BtGUZ97pcKOFG7bhNzhabJQysuxxWgjVQIWf3J07Wj8&amp;s=ugp8dpIHA9dciXe" title="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nux.ro&amp;d=DwIGaQ&amp;c=Ftw_YSVcGmqQBvrGwAZugGylNRkk-uER0-5bY94tjsc&amp;r=Tou2GfskafF_UnC0yPjAjEzLDhbALx-0EDoLp3_iSss&amp;m=BtGUZ97pcKOFG7bhNzhabJQysuxxWgjVQIWf3J07Wj8&amp;s=ugp8dpIHA9dciXe">https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nux.ro&amp;d=DwIGaQ&amp;...</a>