Paths

In most operating systems, all files and directories are located with a path. The “path” is the “full name” of every file & directory.

In a Unix-based operating system, the files are organized into a tree structure. The tree is “upside down” because the root directory is at the top, and directories branch off from there. The root directory is indicated with a forward slash /.

graph TD C["/"] --> etc["etc"] C["/"] --> opt["opt"] C["/"] --> lib["lib"] C --> usr["usr"] C --> home["home"] C --> var["var"] home --> mst3k["mst3k"] home --> im4u["im4u"] mst3k-->myfile["myfile"] mst3k-->mydir["mydir"] mydir-->file1["file1"] mydir-->file2["file2"] usr--> bin["bin"] usr--> share["share"] usr--> local["local"] bin--> ls["ls"] bin--> pwd["pwd"] bin--> cd["cd"]

The home directory is the usual name on Linux and similar Unix-based operating systems for the folder that holds user directories and files. On MacOS it is called User. On both, the separator between branches of the tree is the forward slash.

/home/mst3k/myfile
/Users/Misty Tea/Documents/Homework.pages

Windows files and folders also have paths. In Windows, drive letters or volumes are the top-level folders, and usually there is more than one. User files are in Users, similar to MacOS.

C:\Users\Misty Tea\Documents\Homework.docx
Previous
Next