[CONTACT]

[ABOUT]

[POLICY]

split et impera Internet access

Found at: republic.circumlunar.space:70/~katolaz/phlog/20190209_split.txt

   split et impera   
=====================

Internet access has not always been as fast and widespread as in these
days. In the late 90s I didn't have an Internet connection from home,
and I used my uni account to get all sorts of software for my first
GNU/Linux box (a RH 5.x). Well, the uni connection was *fast*
(10-100Mb/s from the i486 "workstations", when the very best you could
do from home was 33-56Kb/s). For those who remember it, that was the
heyday of "sunsites", Archie, and yes, gopher as well.

The only problem was that floppy disks were the only way to carry home
whatever you had downloaded [->a]. And floppy disks were formatted at
1.44MB [->b]. How to bring home the latest GNU emacs-20, which was
distributed as a 12MB tar.gz? Simple: you used `split(1)`, an ancient
tool of great power:

  $ split -b 1420k emacs-20.3.tar.gz

When split(1) was finished, you would have:

  $ ls
  emacs-20.3.tar.gz  xaa  xab  xac  xad  xae  xaf  xag  xah  xai  xaj
  $

split(1) had "split" the original file into chunks of 1420KB (see the
option '-b 1420k'). Each of them would easily fit in a single 1.44MB
floppy. Now I just had to mcopy(1) them onto 10 floppies, carry the
floppies home, mcopy(1) the ten files into a folder of my desktop
computer, and then give:

  $ cat xa* > emacs-20.3.tar.gz

[->c]

The original split(1) could only split a file in chunks containing a
certain number of lines (1000 by default), but then evolved to allow
splitting in chunks of a given size. The csplit(1) tool is a close
relative of split(1), which can split a file using regular expressions.
It might be very useful, for instance, to split a file in "records".


 -+-+-+-

cat(1) appeared in UNIXv1 (1971)
split(1) appeared in UNIXv3 (1973)
mcopy(1) is part of GNU mtools, has been in any GNU/Linux distro since
         Slackware 1.0.1 (1993), but I suspect is older than that
csplit(1) appeared in UNIX PWB (1977-1979)

 -+-+-+-

[*a] you downloaded stuff in /tmp, since the user quota was at 10MB, and
I used them up by compiling wmaker, links, and ncftp

[*b] you could actually format those floppies to safely contain about
1.7MB, and even to less-than-safely contain about 2MB...

[*c] Unfortunately, it was quite common for at least one of the 10
floppies to be broken, so I had to wait one or two days to come back to
uni, hope that the machine I had used was free (/tmp was local), hope
that nobody had rebooted it and the admin had not wiped /tmp, get the
missing chunk, copy it into a new floppy, and wait until evening to have
my whole tar.gz ready to be uncompressed and compiled. This is also how
I got the first Linux 2.2 kernel. 



AD: