Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having a strange problem this morning

I'm trying to cd into the "Application Support" directory on my Mac, using the following command:

cd '~/Library/Application Support'

Unfortunately, this does not seem to be working as expected and I get this message:

-bash: cd: /Users/purinkle/Library/Application: Not a directory

Even trying cd ~/Library/Application\ Support/ doesn't work

share|improve this question
    
Try running a shell with default state using bash --noprofile --norc and try running the cd command in that shell. If it works, then something in your shell customization is the problem. –  Chris Page Nov 8 '11 at 9:11

3 Answers 3

cd ~/Library/Application\ Support/

work fine on my machine .

share|improve this answer

You may not put colons around the ~ which otherwise will not be dissolved to home real home directory any more.

Use a backslash to escape the space like you tried or escape only the folder containing the space:

cd ~/Library/'Application Support'/

Your last line works for me. Double-check your spaces, if you still press [alt] while typing space, you will enter some protected space not recognized by bash but displayed similarly. Superuser could have converted this, though (just tested using the preview while posting, it does indeed).

share|improve this answer

Both single quotes and double quotes prevent tilde expansion.

Any of these should work though:

  • cd ~/'Library/Application Support/'
  • cd ~/Library/Application\ Support/
  • cd "$HOME/Library/Application Support/"
share|improve this answer
    
I've tried all three and I've even tried cd "/Users/purinkle/Library/Application Support/", but to no avail –  purinkle Nov 5 '11 at 13:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.