[cs631apue] How does cd ~ be translated to cd /home/username?

Yanqiao Zhan yzhan14 at stevens.edu
Mon Dec 14 03:16:27 EST 2015


Hi Professor,

When "cd ~" is executed, how does shell translate this "~" to username?
I have unset HOME, USER and LOGNAME from environment, but shell still can
translate ~ to /home/yzhan14(my log name).


Thank you!
Yanqiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20151214/712a1ebe/attachment.html>


More information about the cs631apue mailing list