[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why can't I move the document root for a site in Apache 2? [SOLVED]



On Tue, Sep 01, 2020 at 10:29:55AM +0200, tomas@tuxteam.de wrote:
> [1] Why people keep insisting in calling those things "folders" is
>    beyond me. They don't "fold" anything, do they?

It's a Microsoft Windows thing.  Windows presents directories and
files graphically, and the icon for a directory is a picture of a manila
folder.  Then to make matters worse, they use the word "folder" in
their menus and so on ("New Folder").

So you've got multiple generations of people who grew up learning things
The Windows Way.  Whenever you see someone on this mailing list who
top-quotes, and calls directories "folders", it's a safe bet they were
raised on Windows.

Very few people, even veteran Unix/Linux users, actually know where
the word "directory" comes from.  See, originally, a directory in a
Unix file system was just a tabular list of filenames and inode numbers,
like so:

foo.txt       6890
bar.c         774
bar.h         775
Makefile      4583

Of course, the numbers were encoded in binary, not ASCII, and there
were no newlines afer them, and the filenames weren't space-padded...
but you get the point, I hope.  That's basically what a directory
looked like, and for a long time, you could cat one and actually *see*
it.  (You can't any more.  The kernel and libc forbid it now.)

It's called a directory because it works and looks exactly like a
telephone directory.  You look up a name in the directory to get its
inode number, so you can access the data within the file system.
(And telephone directories are called that because the word "direction"
is an antiquated synoym for "address".  Directory literally means
"address book" or "address list".)

If multiple directories have entries with the same inode number, then
they both refer to the same file.  That's how "hard links" work.  A
field inside the inode keeps track of how many links are believed to
exist to each inode, so the file system can determine when it's safe
to reallocate the file's storage space.  That reference count is displayed
by "ls -l".  It's the number following the permissions.

Now, try to imagine what happens when people who grew up with the
knowledge of how Unix directories actually work meet up with people
who grew up thinking you open a folder by clicking on it with a mouse.

You don't even have to imagine it -- it's happening all around you.


Reply to: