Re:The Unix Operating System (1982) [video]
by m_sahaf on Sunday May 31, 2020 @05:05AM
(#23368249)
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?
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!).
Re:The Unix Operating System (1982) [video]
by nineteen999 on Sunday May 31, 2020 @05:52AM
(#23368411)
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.
Re:The Unix Operating System (1982) [video]
by smabie on Saturday May 30, 2020 @11:38PM
(#23366977)
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..
Re:The Unix Operating System (1982) [video]
by anthk on Saturday May 30, 2020 @11:55PM
(#23367050)
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 ... )
Re:The Unix Operating System (1982) [video]
by deviantfero on Sunday May 31, 2020 @03:58AM
(#23368008)
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
Re:The Unix Operating System (1982) [video]
by LeoPanthera on Sunday May 31, 2020 @02:15AM
(#23367616)
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.
Re:The Unix Operating System (1982) [video]
by nineteen999 on Sunday May 31, 2020 @05:46AM
(#23368391)
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.
Re:The Unix Operating System (1982) [video]
by anthk on Sunday May 31, 2020 @12:06AM
(#23367102)
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.
Re:The Unix Operating System (1982) [video]
by mork5zid on Sunday May 31, 2020 @07:55AM
(#23368961)
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...
Re:The Unix Operating System (1982) [video]
by zozbot234 on Sunday May 31, 2020 @10:13AM
(#23369712)
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.
Re:The Unix Operating System (1982) [video]
by ferzul on Sunday May 31, 2020 @07:39AM
(#23368900)
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?
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!).
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.
His full command is:
$ makewords sentence | lowercase | sort | unique | mismatch
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 ... )
They emphasize that users build their own vocabulary. And it is quite possible these command were shared inside AT&T.
The point is to show pipes to the public so they understand command chaining.
http://9p.io/magic/man2html/1/p
https://github.com/0intro/plan9/blob/master/sys/src/cmd/p.c
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?