cd command –
The cd stands for change directory. Just as you would click on a folder in Windows Explorer or Finder,
cd switches you into the directory you specify. In other words,
cd changes the working directory.
Let’s see where we are at this moment using the pwd command.
At this moment we are inside the workspace directory. And we can list the contents of this directory using ls command.
Inside the workspace we have a lwd directory.
Let’s say you want to go inside the lwd directory. To do that we can write
And inside lwd directory, we have a README.md file and two directories data and notebooks.
Let’s go back to the the workspace directory which is one step above us. To move up one directory, we use
Let’s say we want to go inside the lwd directory then inside the data directory in one go, without using two separate cd commands.
To do that we have to write
Let’s say we again want to go back to the workspace directory which is two step above us. To do that we will write.