Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

learningxl2010

macrumors newbie
Original poster
Jul 28, 2014
1
0
India
I am new to mac and was having snow leopard installed in my macbook. In terminal window I have been using command cd ~ to return to my home folder and it used to work perfectly fine.

I recently upgraded myself to os x maverick. Now when I use cd ~ command in terminal I get reponse as follows
-bash: cd: ˜: No such file or directory

I am learning PHP on apache server. I have started apache server and to change my root directory I have created Myusername.conf file in etc/apache2/user folder, used chmod 644 command & restarted folder. Now when I type localhost/˜Myusername/ address in my browser I get page not found message. I don't understand why ˜(tilde) is not working on my mac.


Request your Help. Thanking in anticipation

PS. I tried all the above command in another mac (with 10.6 OSx). The command Cd ~is working there and all my apache procedure mentioned above also works perfectly well
 

Attachments

  • Screen Shot 2014-07-29 at 11.26.26 am.png
    Screen Shot 2014-07-29 at 11.26.26 am.png
    438.4 KB · Views: 116

mfram

Contributor
Jan 23, 2010
1,311
353
San Diego, CA USA
If you use the 'cd' command without an argument, it will send you to your home directory. There are several possibilities.

First, we can double-check your tilde...

Code:
echo ~; cd; pwd

You should get two strings which are the same. That's your home directory. If you get any weird messages then it implies there's some permission problem. You mentioned 'chmod 644'. If you change a directory permission to 644 you won't be able to list the contents of the directory anymore. Likely not what you intended. A directory should likely be set to 755. Files to 644.

BTW, the way ~ works in the shell is independent of how Apache implements ~. They are separate concepts which usually, but not always, point to the same place.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.