In the last video we talked a bit about navigating around Linux. This video I wanted to go in a bit more depth. You can imagine the linux filing system as a tree. When you run pwd, you get the absolute path of where you are. There are important terms relating to paths that you should know.
When someone says the root directory, they are referring to the very first directory. To get to the very first directory you can type:
Another important directory is called the home directory.
This is the directory for your user. This is the default directory that opens when you open a terminal. There is an easier way to go to the home directory though:
The tilde is a trick you can use that refers to your home directory. You can also reference stuff relative to the home directory.
This introduces the concept of relative directories. We can reference a directory in relation to other directories. We actually already did an example of this when we did:
This is saying to move one directory up. We don’t necessarily have to start from the root directory. We can also get more complex… such as
We are going a bit out of scope of intro to linux, so let’s get back on track.
Let’s go to the home directory:
we can create a file using:
We can move a file using the mv command. For example:
mv filename.c /Directory
We can rename a file using this same command:
mv filename.c test.c
We can delete a file with:
I think we are going beyond the scope of this video though, so that’s all I’m going to say for now.
HELP ME! http://www.patreon.com/calebcurry
Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter
More content: http://CalebCurry.com
Amazing Web Hosting – http://bit.ly/ccbluehost (The best web hosting for a cheap price!)