I have a file in gmail.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 I did wrong?
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 aftercd
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:But the
Rubyscript
folder is not located in/home/Peter
. As thefind
command said, it's located in/media/aruprakshit/FA686DE4686DA05D
.Therefore, you should run this command instead:
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.)
There is no
Rubyscript
in your~
directory. You should type: