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 have a problem with cd-ing into folder named "--Recovery Files" and can't remember how to escape dashes in the filename. Any ideas?

share|improve this question

migrated from stackoverflow.com Jul 11 '11 at 14:52

This question came from our site for professional and enthusiast programmers.

3 Answers 3

You can use:

cd -- '--Recovery Files'

The -- tells cd that no further command line arguments should be treated as options.

share|improve this answer
+1, never knew that existed! –  adarshr Jul 11 '11 at 14:51

2 choices:

  1. cd -- --Recovery\ Files
  2. cd ./--Recovery\ Files
share|improve this answer
cd -- '--Recovery Files'

The -- by itself indicates that subsequent words beginning with a dash are not to be interpreted as command-line options.

share|improve this answer

Your Answer


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