0

I am trying to figure out why I can't get into a directory. I am in terminal. when I type ls I get:

Desktop Documents Downloads Music Pictures Public Shinobi snap Templates Videos 

all in blue.

then I enter cd /Shinobi/ it says there is no such file or directory. What am I doing wrong?

AlexOnLinux
  • 962
  • 7
  • 20

2 Answers2

1

You have to type cd Shinobi/

Type in pwd this will show you what directory you are in. I guess you are inside your user directory inside /home/

There is a big difference in /Shinobi/ and Shinobi/

  1. The first is an absolute path under / root Shinobi/
  2. the latter is a relative path viewed from the directroy you are in.

The correct absolute path should be: /home/Username/Shinobi/ which is the same as ~/Shinobi/

You can use TAB in terminal for autocomplete. This can help to avoid such mistakes.

AlexOnLinux
  • 962
  • 7
  • 20
1

The problem is you have typed an absolute path from root: /Shinobi is the directory Shinobi in the root folder.

The correct command is cd Shinobi (assuming you're in the directory containing Shinobi - which you seem to be as it appears when you type ls)

The alternative of course would be to type the complete absolute path to the Shinobi directory - you can find out the absolute path by typing cd Shinobi (to get into that directory) then pwd to 'print working directory' - that will show you the absolute path to get there from anywhere in your system.

Will
  • 2,292