Measuring (or calculating) how many bytes are actually written to disk when I repeatedly save a file
- Date: Sat, 6 Apr 2019 13:39:27 -0400
- From: rhkramer@xxxxxxxxx
- Subject: Measuring (or calculating) how many bytes are actually written to disk when I repeatedly save a file
Background: I am considering buying a new disk (and will write an email later
with some other questions or observations about the process), but I know that,
at least often for SSD drives, they now specify what I will call the longevity
in terms of TB TBW (iiuc, that is terabytes total bytes written).
Anyway, I edit large files many times a day and try to save it at each edit or
partial edit (at a guess, one particular file is around 100 MB, and I may save
it 200 or more times a day).
There are two things I'd like to measure, and I'm wondering what tools (or
approaches) are available:
1. I'd like to count how many times a day I actually save the file. (One
approach (at least I think I could do this) could be to write a sort of shell
script wrapper and always initiate saves using the shell script, but I was
hoping there was more of pre-built solution.)
2. A lot of my editing involves editing near (but not at) the end of a file. I
assume (I know) that the software that saves the file is smart enough not to
rewrite the entire file but instead to preserve the beginning of the file and
just rewrite the changed part of the file (or from there to the end of the
Can anyone confirm that, and, if so, suggest any way of measuring how much is
written to a given file in a given time period (e.g., per day)?
I guess at a very deep level (I mean like at the level of the disk firmware or
driver level), this may differ between an SSD and an HDD -- if you have any
insight into that, I'd appreciate that.