🖥️Directory
Also known as Folder, Directories, Subdirectory
A folder: a place that holds files and other folders. They form a tree.
Think of it like
Think of it like a drawer. A drawer holds papers, and it can hold smaller boxes too.
Example
Jack makes a folder for his project with mkdir site. Then he moves into it with cd site and adds his files.
Why it matters
Every project is a directory full of files and more directories. Tools find your code by where it sits in that tree.
Definition
Example code
console
$ mkdir site
$ cd site
$ pwd
/home/jack/siteCommon mistake
Key takeaways
- 1Holds things. Files and other folders go inside.
- 2Makes a tree. Folders inside folders, down from the root.
- 3Two names. Folder and directory mean the same.