mirror of
https://github.com/termux/termux-packages
synced 2024-06-30 10:47:07 +00:00
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. |
||
---|---|---|
.. | ||
build.sh |