Sample Header Ad - 728x90

Determine file system timestamp precision

14 votes
4 answers
13019 views
File timestamps precision is limited to one second for EXT3, one microsecond for UFS, and one nanosecond for EXT4 (at least according to experience). Is there any way to determine this based only on filesystem info? The hacky alternatives I can think of are either to limit all my unit tests to seconds (which I do now), or to touch a bunch of files and checking which digits are zero in stat -c %x.
Asked by l0b0 (53368 rep)
Apr 19, 2011, 07:01 AM
Last activity: Mar 30, 2025, 08:11 PM