If the lines are fixed length, you may use the binary vi's to write
only the portion to be updated. You need to know the exact offset of
the line to be changed, though.
This option, anyway, only minimizes the possibility to damage the file.
When you modify a file, there is always a possibility to loose data (in
fact the probability is usually very small).
If you really want to be sure, you may for example maintain two twin
files, to be written in sequence; if something goes wrong with one of
them, the other will still be ok, with the only possible exception of
the last update.
No hope if your HD fries, however...
Paolo
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021