Sample Header Ad - 728x90

Why does reading a file with hexdump sometimes change find's sparseness value (%S)?

3 votes
1 answer
89 views
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.000135559 to 0.631297 - 0.00466808 to 0.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
Asked by Franck Dernoncourt (5533 rep)
Mar 10, 2024, 02:37 AM
Last activity: Mar 10, 2024, 10:33 PM