1753726 Members
4408 Online
108799 Solutions
New Discussion юеВ

cd to home directory

 
sai_2
Occasional Advisor

cd to home directory

Hi:

On the 11.0 box when i do a cd ~username it does not take me to the home directory. But if i type cd /home/username it gets there. The other box is able to do it. Curious why??

Thanks
Sai.
4 REPLIES 4
Helen French
Honored Contributor

Re: cd to home directory

Hi,

Any error messages ? Did you check the $HOME variable with 'env' command ? what is it's value ? Also check the home directory in /etc/passwd.

HTH,
Shiju
Life is a promise, fulfill it!
Michael Tully
Honored Contributor

Re: cd to home directory

Hi,

You will find that the entry in the /etc/passwd file does not correspond to the directory you think it is in /home

Suggest you check there first, you will see some soort of syntax problem (spelling) or just incorrect.

Michael
Anyone for a Mutiny ?
Rusty Sapper
Frequent Advisor

Re: cd to home directory

The home directory may not be set up in the /etc/passwd file for that user. Better chack that first.



-Rusty
Jeff Schussele
Honored Contributor

Re: cd to home directory

HI sai,

If it's your own HOME you can just do ~/
If it's someone else's you can do ~username ONLY if you have permissions allowing you EX you're in same group & dir has group perms.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!