Class 2B - Introduction to the File System
Contents
Class 2B - Introduction to the File System¶


Announcements¶
Lab 1 will be due Saturday September 18, 2021 at 6 PM
GitHub Classroom and GitHub accounts
My office hours will be 30 minutes after every class on Monday, Wednesday, and Friday 15:00 - 15:30
Lab sessions will be on Zoom, find the link to your Zoom link on Canvas.

File System¶
The file system organizes data on a device as a hierarchy of directories and files (like a tree). Each folder (AKA directory) has a name and can contain any number of files or subdirectories. Each file has a name. The user can change (navigate) directories in the hierarchy.

File System¶
The tree is rooted at, well, the root.
There is only one root of a directory hierarchy. Every item in the tree is either a file or a directory (AKA folder).
You can think of a directory as a container that may contains files and/or other directories.
Files on the other hand hold information (and cannot contain other files or directories) .
If directoryC is contained in directoryP, then directoryC is a child of directoryP and directoryP is said to be the parent to directoryC.
A directory may have many children, but can only have one parent.
Absolute versus Relative Path¶
The root of the file system is the directory “/”
There is only one root of a directory hierarchy.
A path to a new location (from your current location) can be specified as an absolute path from the root (this will work no matter where we are in the file system):
Activity: Let’s try to re-create that directory and file structure¶
You will need the following commands:
cd
: change directorypwd
: print working directorymkdir
: make directoryls
: list directory contentstouch
: create an empty file with a specific namecode
: edit the file in the VS Code editor
display(Markdown('#### Supplementary video on absolute vs. relative paths'))
IFrame('https://www.youtube-nocookie.com/embed/sqX6hu7oEew',width="100%",height="500px")