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.

On one of my computers cd ~ (cd tilde) has stopped working. It says the desired path can not be found.

Any idea what could cause this? I need it for git. (it does work in Git Bash though)

share|improve this question

2 Answers 2

up vote 4 down vote accepted

cd ~ won't work in cmd.exe (unless you have a directory named "~" - the equivalent in cmd.exe is just plain old cd.

Cygwin (and possibly other implementations of) bash does correctly resolve this. Are you not running this command in bash?

cd ~ may work in Powershell, though (different from cmd.exe)... haven't tried...

share|improve this answer
    
I forgot I had cygwin running on the other machine where it just worked :) Thanks –  Thomaschaaf Jan 7 '12 at 18:46
1  
cd ~ works in PowerShell. –  KovBal Jan 7 '12 at 18:52

Are you using the classic windows command prompt or windows power shell? It should work in the later but not in the former.

share|improve this answer

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.