svn commit: r326554 - in head: . usr.bin/sponge usr.bin/sponge/tests usr.bin/tee

Konstantin Belousov kostikbel at gmail.com
Tue Dec 5 13:44:20 UTC 2017


On Tue, Dec 05, 2017 at 02:00:00PM +0100, Hans Petter Selasky wrote:
> On 12/05/17 13:58, Rodney W. Grimes wrote:
> > Further more, why does freebsd need this in base?
> 
> Hi,
> 
> I think this is useful. It could replace the "-i " (intermediate) option 
> for "sed" for example. It avoids creating temporary files when filtering 
> files, right?

No, if process fails during the operation, user data is destroyed
irretrievable.The usual trick of creating temporary file and renaming
ensure that old file is around until all data for new file is written
into buffer cache. With some existing filesystem support, it also
guarantees that the old file is around in case of the system crash.

All this assuming the tool' code matches its description, which is not.


More information about the svn-src-all mailing list