Command line go up 3 levels number 8


#1

I am trying to use the cd command to go up 3 levels and I am getting the error of "no such file or directory".

  1. Change directories three levels up to the daily-buzz/ directory, and print the working directory

cd /politics/national/daily-buzz

Thanks for the help!


#2

Hi @webjumper21574,

When using the terminal, . refers to the current directory and .. is for the directory one level above the current. So, to go up 3 levels you'd run this:

$ cd ../../..

cding into /politics won't work, since that would take you to the root of your file system and look for a directory called politics there, when you actually want to be looking in your home directory instead. However, the exercise wants you to use .. to change directories upwards, so you should do it the way I've shown you.