View Full Version : [ubuntu] Cannot Change Directories (cd not working?)
mistypotato
February 5th, 2009, 03:17 PM
When I type DIR, I can see a list of folders (directories) and Desktop is listed.
But I cannot change the current directory TO that directory.
I tried
cd -/Desktop
cd Desktop
cd /Desktop
cd ./Desktop
none work and the response is.....
bash: cd: -/: invalid option
cd: usage: cd [-L|-P] [dir]
RobsterUK
February 5th, 2009, 03:29 PM
It should be:
cd[space]Desktop
if that directory exists. That doesn't work?
ibutho
February 5th, 2009, 03:36 PM
Try
cd ~/Desktop
blackgr
February 5th, 2009, 03:36 PM
When I type DIR, I can see a list of folders (directories) and Desktop is listed.
But I cannot change the current directory TO that directory.
I tried
cd -/Desktop
cd Desktop
cd /Desktop
cd ./Desktop
none work and the response is.....
bash: cd: -/: invalid option
cd: usage: cd [-L|-P] [dir]
You are using the wrong symbol. you have to use ~ not -
Flimm
February 5th, 2009, 03:36 PM
The correct command is
cd Desktop
Assuming of course you're currently in your home directory. (Use pwd to make sure)
cd -/Desktop
cd will think that -/Desktop is a command line option, and say so.
cd .Desktop
cd will think that the directory you want to change to is ".Desktop", which doesn't exist.
cd /Desktop
cd thinks you want to change to a directory named Desktop in the root, which of course doesn't exist. The directory you want is /home/user/Desktop
cd ./Desktop
This should work.
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.