I have a file in gmail.rb in the below directory:

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


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 I did wrong?

  • 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, 2013 at 22:35
  • @dkaczynski seems a good tip it is. Can you bit detail your comment? Feb 11, 2013 at 7:27

2 Answers 2


Your prompt says:


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.)

  • 1
    @EliahKagan Thanks for your corrections, it works for me. :) Feb 10, 2013 at 17:20
  • @EliahKagan could you tell me where I can ask Ruby specific questions? just as for help I asked. Feb 10, 2013 at 17:22
  • @eliah-kagan Why you don't say than is ~ tilda? :D
    – user45853
    Feb 10, 2013 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. Feb 10, 2013 at 18:34

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

cd /media/aruprakshit/FA686DE4686DA05D/Rubyscript
  • No, I can see the directory sir, :) Okay let me give it a try as you said. Feb 10, 2013 at 17:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .