Checking current DIR, and moving around in Parent Directory is very easy. If you are searching for a very easy tutorial on checking current DIR or simply checking the Parent Directory, then this tutorial I have made is definitely something you should check out.
It's a very simple tutorial on using Linux commands to move about inside a folder.
Now I will start inside my testfolder just a folder that I am using for testing.
First, you guys will type # ls -a to check for all directories.
# ls -a
This is what you should see on your screen.
Also, If you type
# cd .
Note that there is a "white space between CD and the DOT"
In UNIX, the dot [.] means your current directory, this is something I may not be sure about using at the moment but definitely, something I will use later on.
if you guys type
# cd ..
This will simply move you out from the current folder into the main parent folder.
Let's do a quick breakdown of what has happened above;
- I am in the main "testfolder", which contains 2 subfolders, "test1" and "test2".
- I have used UNIX command # cd .. which will move up 1 directory (it's like clicking back).
- I have used # ls -a to view the current directory (-a shows hidden files) this is to make sure I have moved back.
- This way I can see the main current directory (we moved back from "testfolder" up to the main home root since "testfolder" is located at the home root folder)
It's simple as moving back to the main parent folder. We hope you guys enjoy this easy to follow step-by-step tutorial on Linux