Hacker News new | past | comments | ask | show | jobs | submit login
The Unix Operating System (1982) [video] (youtube.com)
105 points by otagekki on May 31, 2020 | hide | past | favorite | 29 comments



Submitted like 30 times but mostly with no comments, except in 2014: https://news.ycombinator.com/item?id=7830478


It's interesting how the home directories were under /usr during that era. If you notice at 13:35, when Brian runs `pwd`, he's at `/usr/bwk` and he says: "that's where I start when I login." Is there any history behind the shift? Or is it just a Linux idiosyncrasy?


Here's a little bit of the history:

http://lists.busybox.net/pipermail/busybox/2010-December/074...

When the operating system grew too big to fit on the first RK05 disk pack (their root filesystem) they let it leak into the second one, which is where all the user home directories lived (which is why the mount was called /usr). They replicated all the OS directories under there (/bin, /sbin, /lib, /tmp...) and wrote files to those new directories because their original disk was out of space. When they got a third disk, they mounted it on /home and relocated all the user directories to there so the OS could consume all the space on both disks and grow to THREE WHOLE MEGABYTES (ooooh!).


It's long been variable between UNIX versions and variants, for example Solaris 5.x (which is a descendent of AT&T UNIX shown in this video), the common location was/is /export/home, since home directories were commonly exported via NFS to other machines. It might have been IRIX from memory that even used /usr/people.

VFS was introduced around SVR4 as part of the SVR3/SunOS merge IIRC so that made it easier to mount home at whatever location most suited, but the reality already was that home was wherever your /etc/passwd entry said it was. Most Linux distributors had de facto standardised on /home long before the Linux FHS.

Looking at more recent BSD's, FreeBSD 11 seems to be using /usr/home, with both OpenBSD 6.x and NetBSD 8.x using /home by default.


That crunchy sound of the VT1xx terminal and the other keyboards in this video are giving me an intense feeling of nostalgia.


I love that video. I’ve seen it 5 times and every time I have to watch the whole thing.


What commands is Kernighan using in his spell checker example? makewords? lowercase? unique? mismatch? Were these really commands in AT&T unix? I kind of suspect that they created some "unique" shell scripts for this video to make it easier to understand..

His full command is:

$ makewords sentence | lowercase | sort | unique | mismatch


I bet he just aliased commands for expository reasons: “uniq” aliased to “unique”, and “tr A-Z a-z” to “lowercase”.


I just checked in an AT&T UNIX emulator, and it doesn't look like any of those commands exist. I think they made them for the video.


makewords -> tr ' ' '\n'

unique -> uniq

lowercase is easy, tr a-z A-Z

mismatch -> loop and grep over the wordlist and check if the output on non-zero (no match), print that word. A trivial script. (while read line ; do if (grep -q "$line" /usr/share/dict/words) ; then ... )


Yeah, of course. But why is this video claiming they are Unix commands when they are not? Are these just little shell scripts designed for the camera?


Kernighan is good at explaining things, so I'm guessing he wanted to make it as simple as posible, some of those just don't roll of your tongue as well as the aliased versions


> existing UNIX programs (on your machine).

They emphasize that users build their own vocabulary. And it is quite possible these command were shared inside AT&T.


Maybe the idea is that every shell script compromised of existing, simpler commands, is automatically itself a "command" in UNIX. Obvious and simple today, but not a common concept when this video was made.


Wasn't that the same in operating systems like MS-DOS and its predecessors, and on Apple computers as well?


Well yeah I guess if you are thinking in terms of batch scripts, but DOS didn't exist until 1980, and UNIX had already been doing this within a multiuser, multitasking environment since at least 1972.


Oh, my bad, I confused the decade.


They may be, or not. Long ago grep was composed of an ed script (g/re/p), and a spell checker was trivially done this way over grepping /usr/share/dict/words.

The point is to show pipes to the public so they understand command chaining.


I don't think mismatch was grepping over the dictionary at all. That's too slow. The reason you sort the input text first is because it's reading the input text and the dictionary at the same time, making only a single pass through the dictionary...


He also uses “p” as an alias for “more” (or possibly “cat”).



I like how back than they called shell scripts "shell sequences"


That term was used on Amiga as well, though (AFAICT) it was not common elsewhere. The default boot mechanism runs the Shell script 'startup-sequence', found in the root-level directory 'S' of the boot drive.


what were pre-unix file systems like? it sounds like storing bytes in a file in a directory which is a kind of file was innovative, but it's effectively all there is today!

i know old macs had various attributes - e.g. you could store the owner of an file so when you opened it, it would run in the program that generated it, not necessarily the default for files of this type. but is that the alternaitive he had in mind?


In other operating systems, files had fixed-length records or were key-value stores.


Saw that a year back. Thanks ATT for preserving this.


Talk on Unix philosophy, Shell, pipes


featuring Brian Kernighan, Dennis Ritchie, and Ken Thompson.


Somehow haven't seen this before. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: