I heard that timestamps in APFS are in nanoseconds.
Are there any commands that are able to show APFS timestamps in nanoseconds?
I've tried ls, stat but no luck so far.
I heard that timestamps in APFS are in nanoseconds.
Are there any commands that are able to show APFS timestamps in nanoseconds?
I've tried ls, stat but no luck so far.
You can get nanosecond timestamps by requesting floating point output:
% stat -f %Fm foo
1609297230.485880489
There are no commands, but you can create a simple C program to test it:
#include <stdio.h>
#include <sys/stat.h>
int main() {
struct stat attr;
stat("/path/to/file", &attr);
printf("Last modified time: %ld", (long)attr.st_mtimespec.tv_nsec);
}