[chuug] Fwd: Linux filesystem recovery
Jeff King
peff at peff.net
Mon Jul 9 11:28:33 EDT 2007
On Mon, Jul 09, 2007 at 10:35:27AM -0400, Patrick Reynolds wrote:
> Wow, yuck. The oldest version of GNU cat and dd I could find was from
> 1992. cat has always used the block size returned by stat(), which is 4K
> [...]
> I won't speak for -- and won't go digging for, either -- pre-GNU
> implementations.
http://public.planetmirror.com/pub/ancient-unix/ancient/
Ancient (V7, System III) versions of cat used a getc/putc loop, which
would use a BUFSIZ buffer of 512 bytes.
I didn't read carefully through the v5 implementation of cat, as it's
written in assembly language. But it looks like it also uses a 512-byte
buffer (with raw read/write syscalls).
Which isn't to say there aren't other ancient implementations which
failed to buffer. There's quite a bit of branching in the history of
UNIX:
http://www.levenez.com/unix/
-Peff
More information about the Chuug
mailing list