# Introducing file systems to students who really don't understand

In this question, Michael0x2a points out something that I have observed, but never formally considered (emphasis my own):

1. The IDE often introduces several new "metaphors" that need to be explained. (For example, Eclipse has this notion of a "workspace" -- it's not immediately obvious this is actually a folder on your filesystem). This problem is further exacerbated by the fact that a small minority of students don't seem to have a firm grasp of what a filesystem is (which is disconcerting).

I have had, on occasion, to step all the way back to the idea of folders, directories, and directory trees for confused students, but these conversations always get muddled. In spite of years of teaching this material, I am always surprised when a student cannot tell me what directory he or she is in, nor link the idea of a directory to some sort of metaphorical location.

Our so-called techno-natives have real difficulties with this, since phones and taskbars hide directory structures almost entirely. This problem is especially easy to spot the first time a student is introduced to a command line, when I may have a conversation like this:

You are currently in your home directory. Type cd somedir and press enter. Great! We have changed our directory to somedir. Now type cd somesubdir... where are we now?"'

Some students know, but some are genuinely lost. The idea of going back up a directory cd .., or that ls lists the items at your current location, is so opaque that the question itself doesn't even seem to make sense.

Many beginning students seem to already come in with an intuitive understanding of folders/directories, but some do not. Are there useful analogies or metaphors that you use to teach file systems to your students? Do you address this problem in your classroom, and, if so, how?

• Just to add an anecdote, I've encountered students like this (albeit pretty rarely) at the university level. Thankfully, the problem doesn't seem to be quite as bad as @BenI is describing for me -- rather then complete incomprehension, these students (usually Mac users?) just don't seem to know where precisely their files are stored, what a "home directory" is, how exactly to use the built-in file explorer GUI, etc (but do appear to understand the concept of a "folder", thankfully). Sep 5, 2017 at 21:44
• Org chart, or geopolitical arrangement: World, Nation, State, City. Sep 6, 2017 at 0:12
• Provide them with a solid two panel file manager, like MultiCommander, TotalCommander, etc. This makes it easy to grasp the concept. Later they can start with the command line operations. Also, store learning materials in a well structured directory system, which they'll have to use. Sep 6, 2017 at 10:39
• I haven't come across this situation. they already seem to know where the files are, what are these namespaces, workspaces, solutions and projects and where they go into. of course, all of my students are age 20 plus which probably means the faculties who came before me are doing their job :)
– Jay
Sep 6, 2017 at 11:42
• I love this question. I just hired someone who can't type. I stopped testing candidates for typing aptitude years ago... It seems that the "Introduction to Computers" of 20 years ago will become popular again. "Introduction to Computers for the Critically Abstracted". Mar 6, 2018 at 19:04

# The problems

## Hierarchies are not obvious

First let me point out that a hierarchy is not the most obvious or best structure for storing files. It is still based on library categorization systems, where a book can be in only one place. I file could be indexed in more than one place (and sometimes is).

A tag system as used on this-site, Gmail and elsewhere, that allows you to give multiple tags to a file, is better. E.g Tag something as education, computers, filesystems, cats, boxes.

Tags should be arranged hierarchically, not files. However as educators there is little we can do about this.

## Microsoft Windows, Mac OS X, Android, and iOS hide things

Of the big four major proprietary Operating Systems (Windows, OS X, Android, iOS), Microsoft Windows hides the directory structure the least. Apple is probably the biggest villain here. They made an active decision starting with the iPod and iTunes that directories needed to be hidden, and the world has been moving that way ever since.

What I say in this section applies generally to all 4, but I have given specific example for Microsoft Windows.

MS-Windows has some strange non-folder folders (Desktop, Documents, Videos, Music), sort of like symbolic links but not. This causes problems of understanding. For example, I used a tool and known that it has saved to Images, but took over 10 minutes to retrieve the file, as I did not know where on the filesystem it was.

Recent versions of MS-Windows have dropped the ⬆ up arrow (they then brought it back again), in file explorer. It only has ⬅ ➡ left and right arrows. This makes it difficult to navigate and experience the hierarchy.

Recent versions of MS-Windows, by default hide file extensions. This may not affect understanding of hierarchy but does affect understanding of file names. (While I agree that using file extensions to encode file type is a bad idea, hiding them under the carpet is just making it worse.)

Microsoft wants to store pictures with pictures, music with music, spreadsheets with spreadsheets. I want to store teaching stuff with teaching stuff: A class may have a presentation, a work sheet, some images, some source code, etc. it all needs to be kept together.

# Some solutions

## A teaching metaphor

I have taught some year 7 pupils (age 11 years old), by showing them a set of slide and telling them a story. The story was about how you can but a box in a box, and a box in a box in a box, and several boxes in a box. Boxes have names/labels, cats have names/collars. You can also put a cat in a box, but you must never try to put a box in a cat. Boxes are like folders/directories, cats are like files.

You can ask students: “Can a box be in more that one box?”, “Can a cat be, fully, in more than one box?”, “Can a box and a cat be in the same box?” …

## If using Microsoft Windows

• Disable hide file extensions
• Do something about these Libraries (non-folder folders): In my virtual machine with Windows 7, I have disabled all of the libraries.

## Learn the filesystem and the operating system

I would teach the Unix command line (UNIX, GNU/Linux, BSD). It does makes it easier to see how things work. Nothing is hidden, but things are often nicely abstracted. “It is so simple that, if you come up with a metaphor to explain how it works, it probably is how it works.” — miss-quoted from one of the founders of Unix (Thomas, Ritche or other).

I would also recommend using the dolphin file browser. Dolphin has an integrated command line, where directory changes are synchronized in both directions. This makes it easier to switch back and forth between text (command line) and graphical view and/or controller.

You are currently in your home directory. Type cd «somedir» and press Enter.

See the change in the graphical part of the display.

Click on a directory

See the change, in both GUI and command line

GNU/Linux with KDE, has a great GUI, and command line. Intuitive, simple, and follows the principle of least surprise.

GNU/Linux is more available (When compared to some other OSs e.g. macOS, Microsoft Windows): You have the freedom to download it. Run it. Distribute it. Study it. Modify it.

• Note that the comments about navigating in GNU/Linux also apply to the Macintosh which is based on BSD unix. Use the terminal for executing shell commands as on other u* systems. Sep 6, 2017 at 12:27
• @Buffy I agree MacOS X is a Unix, though I have little experience with it. Can you run dolphin on it? Or something similar with synchronised GUI and CLI? Sep 6, 2017 at 12:57
• The UNIX alike file systems however ARE tag based if you squint just right. I have a file, it has an Inode number and a reference count, I also have some directory entries scattered around this tree structure that point to the file. One file, many names. There is a reason the old school refers to the try structure as directories not folders. Also, how did you manage to get those cats to stay in the boxes long enough for a photo? Glue? Velco? Sep 10, 2017 at 18:48
• I love this answer, but it seems to go after Microsoft rather unfairly. Of the big four major commercial Operating Systems (Windows, OS X, Android, iOS), Windows hides the directory structure the least. Apple is probably the big villain here. They made an active decision starting with the iPod and iTunes that directories needed to be hidden, and the world has been moving that way ever since.
– Ben I.
Feb 4, 2018 at 2:53
• @BenI. Have made some improvement, but as I don't use mac or ios, and my android has a file explorer (I don't think they come by default). I can't give example from these. Could you help to redress the bias? Feb 4, 2018 at 9:37

Its actually harder than just finding a modern user-interface which exposes a directory structure. The whole concept of a directory structure is just a convenience - there is nothing 'physical' which it relates to.

Most of us started our interactions with computers at a point where directories were the first point of interaction, so it is hard to relate to the experience gained from modern interfaces where the 'workings' are abstracted and files are located by searching rather than through an index.

I think it's now become important to teach storage structures as soon as you have a scenario which permits it. I think that a library is a good analogy - people are familiar with a large amount of structured content, and books containing different types of content.

To discuss where a document (or book) might be stored, you have potentially quite a lot of layers:

• Country
• City
• Institution (university, council library)
• Department
• Building
• Floor
• Shelf
• Shelf position
• Book title

You can also have copies of the same book - with different notes in the margins, or different pages missing. Today, files are maybe in an anonymous data centre, or on a device, or on removable storage. I think it's useful to go to this level first before introducing the idea that we have a virtual structure within any one drive, because this helps to explain why it starts to be useful to have a structure. When you only own 5 or 10 books, you can easily find them all. Once it's all your photos, and all the music you ever streamed - then it's not so easy.

At this point, you can introduce the idea of arbitrary named containers (which are nested). Explain what they're for and how they are important, then show the real-life example on the actual hardware you're using (and explain why this is abstracted from normal non-expert users).

Note: It also occurs to me that spending too much time re-enforcing legacy storage concepts is not helpful, so resorting to the command line as a primary teaching tool for this might not be good. Teach enough that if they are in an environment where the command line is important, the concepts come naturally, but don't pass on your own legacy baggage.

• I'm wondering if the legacy storage concepts are the only common reference point for the various systems. Otherwise it's a little like teaching about dogs and cats without teaching about mammals, animals, life, physics... To me, it would be missing the entire point of teaching at all. If someone can't find the root of the lesson, they know nothing. Oct 2, 2021 at 22:55

Make sure you are having your students "spelunk" in the file system and have them draw some of the tree structure. Often, this visualization helps them see the way the FS works, more clearly.

We spend a couple of days gaining an understanding of absolute and relative path. I teach this course using a Gnu/Linux server.

• On a mac, the terminal does away with the "hiding" shenanigans. Learn to use your lappy like a pro. Use the terminal. Apr 6, 2019 at 1:06
• I was always uncomfortable with that word 'terminal'. Sounds dangerous. Of course, throughout the medical field 'negative' is a good thing. Photography used to be like that, alas. Now I have trouble even seeing the "dark chamber" it is so small. Oct 1, 2021 at 10:19
• The ‘tree’ command (not always installed by default) can be helpful for visualizing directory structures on the command line. For GUIs, tools like DaisyDisk or WinDirStat have interesting visualizations. Feb 19, 2022 at 5:44