I use a Lustre file system. I've noticed that if I look at the find's sparseness value (%S) for a file, then print the file with hexdump, then look at the find's sparseness value again, then sometimes find's sparseness value (%S) has changed. Why does it change?
Command to look at the find's sparseness value (%S) for the file myvideo.mp4:
find myvideo.mp4 -printf "%S" Command to read the file myvideo.mp4 with hexdump:
hexdump myvideo.mp4 I noticed that behavior on several files. Examples of changes of find's sparseness values (%S):
0.000135559to0.6312970.00466808to0.228736
Is it because the file is being cached partly locally when reading with hexdump? I noticed that this change isn't specific to hexdump, e.g. the same happens with nano (and likely any other program that read the file):
dernoncourt@server:/videos$ find myvideo.mp4 -printf "%S" 0.00302331 dernoncourt@server:/videos$ nano myvideo.mp4 dernoncourt@server:/videos$ find myvideo.mp4 -printf "%S" 0.486752
%S: This is calculated as '(BLOCKSIZE*st_blocks / st_size)'. (diskusage/apparentsize) So it's going to be the same reasons as in your other question.