Linux - Directories
This week's topic was directories. We learned about the commands to use in CLI to navigate, list and work with directories.
Tree was an interesting command to utilize. It presented the file directories in a visual tree-like format. It works recursively and collects all the directories and sub-directories to detail in its visual representation.
Using file will reveal what type of file the file in question is. For example, you would enter file [directory/file] and the output will show you what type of file it is.
There were a few shortcuts that would come in handy when navigating the file system. One was cd ~, which would bring you to your home directory. There is also cd .. which will bring you up a directory or the parent directory. cd- will take you back to the previous directory.
Also we learned about relative and absolute paths. Relative paths are relative to where you are currently located and doesn't start with a / mark. Absolute will have the / marks and always be located in that particular location, ie /home/username/downloads.
We looked over the file system structure and the purposes to each directory.
The file structure for Linux seems pretty straight forward and organized. I found no difficulty understanding how to traverse and understanding the structure of the Linux file system - so long as you understand how your distro is organized.
No comments:
Post a Comment