Files
termux-packages/packages/rw
termux-pacman-bot c0a4eb27f1 rw: add package 'rw', a Rust analogue of sponge(1)
The current version of `sponge(1)` from moreutils always write to TMPDIR for atomic write, even if we point it to stdout.

This will double the wearout of flash storage if target is stdout, e.g:

   $ wget .... | sponge | sort | rev > filename.txt

the data will got written to flash storage in twice:
`$TMPDIR/spongeXXXX` and sort/rev'd `filename.txt`.

Since on unrooted device `TMPDIR` is usually not a tmpfs, using sponge in similar cases will result in unnecessary wearout of flash storage when:

 - invoke sponge w/o params, or target is stdout
 - end of pipeline point to a file in a filesystem different than TMPDIR resides

In case of the length of input data is prior known or splited to less than available memory, we can use `rw` instead.
2022-09-01 02:35:12 +00:00
..