News for hackers. Stuff that matters.
Re:The Unix Operating System (1982) [video] by dang on Sunday May 31, 2020 @12:00AM (#23367074)
Submitted like 30 times but mostly with no comments, except in 2014: https://news.ycombinator.com/item?id=7830478
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?
Re:The Unix Operating System (1982) [video] by qntty on Sunday May 31, 2020 @07:43AM (#23368920)
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!).

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 lakkal on Saturday May 30, 2020 @10:37PM (#23366702)
That crunchy sound of the VT1xx terminal and the other keyboards in this video are giving me an intense feeling of nostalgia.
Re:The Unix Operating System (1982) [video] by modmans2nd on Saturday May 30, 2020 @11:42PM (#23366993)
I love that video. I’ve seen it 5 times and every time I have to watch the whole thing.
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..

His full command is:

$ makewords sentence | lowercase | sort | unique | mismatch

Re:The Unix Operating System (1982) [video] by Wald76 on Sunday May 31, 2020 @12:13AM (#23367119)
I bet he just aliased commands for expository reasons: “uniq” aliased to “unique”, and “tr A-Z a-z” to “lowercase”.
Re:The Unix Operating System (1982) [video] by jedieaston on Sunday May 31, 2020 @02:04AM (#23367571)
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.
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 smabie on Sunday May 31, 2020 @12:00AM (#23367072)
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?
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 sergeykish on Sunday May 31, 2020 @04:38AM (#23368140)
> 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.

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 TomMarius on Sunday May 31, 2020 @05:21AM (#23368305)
Wasn't that the same in operating systems like MS-DOS and its predecessors, and on Apple computers as well?
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 TomMarius on Sunday May 31, 2020 @05:49AM (#23368403)
Oh, my bad, I confused the decade.
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 teddyh on Sunday May 31, 2020 @07:41AM (#23368916)
He also uses “p” as an alias for “more” (or possibly “cat”).
Re:The Unix Operating System (1982) [video] by pmarin on Sunday May 31, 2020 @08:39AM (#23369188)
Re:The Unix Operating System (1982) [video] by Lex-2008 on Sunday May 31, 2020 @08:45AM (#23369216)
I like how back than they called shell scripts "shell sequences"
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?

Re:The Unix Operating System (1982) [video] by mork5zid on Sunday May 31, 2020 @07:53AM (#23368949)
In other operating systems, files had fixed-length records or were key-value stores.
Re:The Unix Operating System (1982) [video] by BracketMaster on Saturday May 30, 2020 @10:27PM (#23366658)
Saw that a year back. Thanks ATT for preserving this.
Re:The Unix Operating System (1982) [video] by otagekki on Thursday May 28, 2020 @06:36PM (#23343755)
Talk on Unix philosophy, Shell, pipes
Re:The Unix Operating System (1982) [video] by combatentropy on Saturday May 30, 2020 @11:10PM (#23366837)
featuring Brian Kernighan, Dennis Ritchie, and Ken Thompson.
Re:The Unix Operating System (1982) [video] by geoffbp on Sunday May 31, 2020 @04:38AM (#23368142)
Somehow haven't seen this before. Thanks!