[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how execute a script

On Wed 18 Nov 2015 at 08:47:59 (+0100), tomas@tuxteam.de wrote:

> Here, gunzip is seeing the file name. Since gzip, by convention, removes
> the original (and gunzip the compressed), effectively replacing each by
> the other), those programs are extra careful. The file name pattern is
> part of the interface specification.


> And that makes sense. In a way yes, it has two personalities: an
> "in-place" (de) compressor and a filter. The first one enforces a
> file pattern convention because it's (potentially) deleting stuff.
> Not that I personally like the in-place thing, mind you. I guess
> it was born out of necessity: if you are zipping a file which is
> much bigger than what you've space left on device, this interface
> makes sense.

What you appear to be saying here is that the new version overwrites
the head of the file while the program is still reading the tail.
This doesn't happen: a new file is written and, when complete, the
old file is removed. So there's always a period when both compressed
and uncompressed versions exist simultaneously on the filesystem.


Reply to: