In the Korn shell you can type...
[tt]
print ~
[/tt]
...to print your home directory, or...
[tt]
print ~username
[/tt]
...to print some user's home directory. You can use the tilda (~) to [tt]cd[/tt] or refer to files. Something like...
[tt]
cp ~smithj/.profile ~
[/tt]
This command would copy [tt]smithj[/tt]'s .profile to my home directory, regardless of what my [tt]pwd[/tt] is.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.