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 have a file in gmai.rb in the below directory:

root@ubuntu:~# find / -name gmail.rb|more

/media/aruprakshit/FA686DE4686DA05D/Rubyscript/gmail.rb

But when i am trying to reach to the Rubyscript using cd getting error as:

$ cd Rubyscript
bash: cd: Rubyscript: No such file or directory

Can anyone help me by saying what the bad I did? :(

share|improve this question
    
while typing long directory paths, tab is your friend. press tab twice to list available files (can even do partial matching by typing the first letters of a file before hitting tab twice) –  dkaczynski Feb 10 '13 at 22:35
    
@dkaczynski seems a good tip it is. Can you bit detail your comment? –  Arup Rakshit Feb 11 '13 at 7:27
add comment

2 Answers 2

up vote 8 down vote accepted

Your prompt says:

Peter@ubuntu:~$

The part between : and $ is:

~

That represents the folder you're currently in. ~ is shorthand for your home folder (/home/Peter). See this section of the Ubuntu community documentation for more information about abbreviations in directory names, and related concepts.

You ran the command cd Rubyscript. The folder name after cd did not start with a /, so it is a relative path--relative to your current location (which is /home/Peter). cd Rubyscript, run from there, is thus equivalent to:

cd /home/Peter/Rubyscript

But the Rubyscript folder is not located in /home/Peter. As the find command said, it's located in /media/aruprakshit/FA686DE4686DA05D.

Therefore, you should run this command instead:

cd /media/aruprakshit/FA686DE4686DA05D/Rubyscript

That will get you there. (Assuming you have permission to enter that folder. Which you probably do--its volume name looks like a UUID, and its length indicates it's probably an NTFS volume. If you mounted an NTFS volume, you usually can enter any folder within it and perform any read or write action.)

share|improve this answer
1  
@EliahKagan Thanks for your corrections, it works for me. :) –  Arup Rakshit Feb 10 '13 at 17:20
    
@EliahKagan could you tell me where I can ask Ruby specific questions? just as for help I asked. –  Arup Rakshit Feb 10 '13 at 17:22
    
@eliah-kagan Why you don't say than is ~ tilda? :D –  ZDroid Feb 10 '13 at 18:31
    
@PythonLikeYOU If it's about how to use the Ruby interpreter and tools, including installing Ruby packages, you can ask here on Ask Ubuntu. If it's about writing programs with Ruby, usually you should ask that at Stack Overflow instead, though if the question is in some way Ubuntu-specific, it would be welcome here. There are probably a number of other Ruby resources I'm just not familiar with, too. –  Eliah Kagan Feb 10 '13 at 18:34
add comment

There is no Rubyscript in your ~ directory. You should type:

cd /media/aruprakshit/FA686DE4686DA05D/Rubyscript
share|improve this answer
    
No, I can see the directory sir, :) Okay let me give it a try as you said. –  Arup Rakshit Feb 10 '13 at 17:10
add comment

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.