Paul Eggert wrote: > How about if we change usable_st_size to return false for these proc files Attached is a better idea, I hope. I audited the coreutils code to look for problematic uses of SEEK_END or st_size when reading files (I didn't look at writing; one can of worms at a time). The attached patch still needs a changelog entry and test cases. The basic idea is to not trust st_size when it's <= ST_BLKSIZE. This fixes bugs in 'head', 'od', 'split', 'tac', 'tail', and 'wc' when applied to input files in proc or sysfs file systems. Here's an example bug fixed by this patch: $ cat /sys/kernel/profiling 0 $ tail -2c /sys/kernel/profiling $ This should be: $ cat /sys/kernel/profiling 0 $ tail -2c /sys/kernel/profiling 0 $