Rixstep
 About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Home » Learning Curve » A Gullible's Travels

~A Gullible's Travels~

Part One in which Micro Luser Gullible regards Unix for the first time.


Get It

Try It

I: Dumping the Drive Letters

'Unix helps those who help themselves.'
 - Ancient Unix saying

There are no drive letters in Unix. It's all one glorious united file system. No more A:, B:, C:.

A: and B: on the PC date back to pre-IBM days. To Gary Kildall's CP/M. They both referred to the same humungoid diskette drive. You kept your operating system files on one diskette and all your data files on another. There were no directories. Everything was in a single motley pile. If you wanted to access data files the system prompted you to switch diskettes. When you were finished the system prompted you to replace your system diskette again. You typed 'A:' and 'B:' to get the system to recognise you were 'switching drives'. At least it worked. But comparing this to professional systems was futile. These were toys.

C: came about when IBM PCs had been around a while and got hard drives with fantastic capacities such as 10 MB. Every hard drive tacked on after the first hard drive C: got a successive letter. Network shares got letters. It's a mess.

Unix was initially a system with two hard drives. But with a single file system.

The PC's operating system wasn't hierarchical to begin with. It was like CP/M - in fact a bit too much for critics at the time. BYTE magazine wrote there was not a thing special about Microsoft's system. Nothing at all. But by version 2.11 things started to change and hierarchy was introduced. With one small caveat: Microsoft turned the component separator around. The forward slash became a backward slash.

This backward slash proved to be cumbersome over the years as system code normally uses the character to denote escape sequences. Internally Windows still recognises paths described with forward slashes instead.

PCs with version 2.11 of the operating system didn't ship with many directories on their hard drives. Hardly any at all. People normally took all the system files Microsoft left in C: root (C:\) and moved them down a level, creating a directory called 'DOS' or 'SYSTEM' and putting everything there. This had the additional benefit of free space in a root directory. Other directories could expand to any size but not a root directory. C:\ was limited to 512 entries.

What a mess.

Unix has a single root. No drive letters. Just a root. One root. And that root is often called root as well. And it's denoted by a single forward slash.

/  <-- Unix single root directory ('root')

Everything is sorted under this directory.

As stated above, the earliest Unix systems at Bell Laboratories used two hard drives. The first drive - the boot drive - contained all the files in root and then some. Actual user files were stored on a second hard drive. Once the system booted this second hard drive was mounted onto the boot drive's file system.

The boot file system mounted the second drive at the following path.

/usr  <-- Original location of all user files on early Unix systems.

User accounts were sorted under this directory. Users such as 'ken' for Ken Thompson, 'dmr' for Dennis M Ritchie, and 'bwk' for Brian W Kernighan.

/usr/ken  <-- Ken Thompson
/usr/dmr  <-- Dennis Ritchie
/usr/bwk  <-- Brian Kernighan

But on the second drive itself these user files were found in that hard drive's root directory.

/ken
/dmr
/bwk

But the root of the second hard drive was mounted onto the path /usr on the file system of the boot drive. So it appears and feels like you have a single hard drive and can access all files seamlessly. But it was actually two hard drives.

You can 'mount' hard drives anywhere you want on Unix. The bottom line is it's going to be a single file system sorted under root ('/') no matter what you do or what you try.

On Apple's OS you'll find network shares and CDs and DVDs mounted under /Volumes.

Having a single file system - a single hierarchy - makes generic operations a lot simpler. Unix was the operating system that brought file system hierarchy into the mainstream. Windows doesn't have too many laudable features but the few it does have all come from Unix. And this is one.

Read on.

About | ACP | Buy | Industry Watch | Learning Curve | News | Products | Search | Substack
Copyright © Rixstep. All rights reserved.