Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I need to change the directory to following path

/media/New Volume/softwr/pgm

and

/home/sdk

for 2 diff purpose. But by using cd its not working

I tried

cd media and cd home

Both time its showing such file or directory not existing. I am new to Linux environment.I'm using Ubuntu 12.04LTS Can anyone help?

share|improve this question
    
Where and how did you create the directories? –  Mitch Sep 28 '13 at 8:10
    
Are you sure that those directories exists? –  Radu Rădeanu Sep 28 '13 at 8:17
    
    
@Mitch those where already existing.New volume is the D drive of windows which is also accessible from linux.2 os in system –  Sjk Sep 28 '13 at 11:16
1  
@Sjk If you are sure that New Volume exists in /media, you should use: cd /media/New\ Volume or cd "/media/New Volume" because of that space. –  Radu Rădeanu Sep 28 '13 at 13:33

2 Answers 2

up vote 1 down vote accepted

When you open a Terminal, the working directory is you home, so you can easily go to /home/sdk by entering:

cd sdk

Otherwise, you should type the complete address beginning with /. In the case of an address contains spaces you have to use quotations or use \ before the space. Like:

cd "/media/New Volume/softwr/pgm"

or

cd /media/New\ Volume/softwr/pgm

Note that Linux is case-sensitive, so be careful about the uppercase letters.

share|improve this answer
    
.I didnt knew about this problem with space and case-sensitive issue.it works thanks. –  Sjk Sep 30 '13 at 8:49

cd media and cd home will never work because you are trying to change to a directory called media or home in your current directory.

braiam@braiam-PX741AA-ABA-A1104X:~$ cd media
bash: cd: media: No such file or directory
braiam@braiam-PX741AA-ABA-A1104X:~$ cd home
bash: cd: home: No such file or directory

The correct path is with / at the start.

:~$ cd /media
:/media$ 
:~$ cd /home
:/home$ 

Read the Relative and Absolute path of this answer for more information.

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.