I have this weird situation on my Mac running OSX Lion where the ~ (tilda) does not go to my user directory. Instead when I type "cd ˜", I get:
-bash: cd: ˜: No such file or directory
Any advice on how to fix this?
I have this weird situation on my Mac running OSX Lion where the ~ (tilda) does not go to my user directory. Instead when I type "cd ˜", I get:
-bash: cd: ˜: No such file or directory
Any advice on how to fix this?
The other answers are correct in that you are not typing the regular tilde character but are using the small tilde character. What the other answers do not explain though is why when you type tilde you are getting the small tilde and not the large tilde.
The same problem plagued me for some time. I found the problem was I was using the 'US - International' key mapping. Try changing it in System preferences > Language and Text > Input Sources. With that keyboard selected you need to type the tilde and then hit the space bar to see it change from small tilde to regular tilde.
Yep, that's an enye (option-n) not ~ (shift-`)
Try this one:
It's results the tilde you want:
~
The
˜
character's code is0x02DC
and the code that works in bash like shortcut to home directory is0x07E
.After changing the keyboard (System Preferences>Keyboard>Input Sources) from 'US International - PC' to 'U.S.', I was able to verify tilde sign (~) works as expected from Terminal.
It looks like in some of the macbook, the keyboard is set to 'US International - PC' instead of 'U.S.'
I set up KeyRemap4MacBook application and type
~
withshift+escape
alt+5 is what you are looking for...