I am using OSX Lion and every time I tried to cd to my Desktop folder using "cd ~" and cd "Desktop" it stays in my home directory instead of going to Desktop. I've tried to perform the commands using sudo but it makes no difference.
Thanks.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityUsing the sudo command will grant access to any folder or file on the Mac.
The commands sudo cd ~ return and sudo cd Desktop return only appeared to fail. In fact, both commands succeeded but exited without any output.
To demonstrate this try the command sudo -i "cd ~;pwd"return which should print /var/root in the terminal window.
In order to use the same commands interactively, do following:
sudo -i returncd ~ returnpwd returnOutput
/var/root
pwdand press Enter, what is the output? (Star out username if you want)ls?cd ~/Documentswork ?pwdI realized I was in another user's home folder. That's why I couldn't access the home folder. But I am the administrator, why can't I access the other standard user's folder, even withsudo? It looks like their Public folder is the only one I could access.sudodoesn't mean you own the files from other users. Permissions still apply.