Saturday, April 27, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 1997  / 3 Years ago, sat, may 22, 2021, 4:38:37

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?


More From » command-line

 Answers
0

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


[#32753] Sunday, May 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
allowiel

Total Points: 189
Total Questions: 103
Total Answers: 105

Location: Slovenia
Member since Thu, Mar 18, 2021
3 Years ago
;