This is the final command I'm using, thanks largely to rc0r:
find /path/to/files/* -printf "%TY%Tm%Td%TH%TM%TS|%p|%l" -exec stat -Lc "|%y" {} \; | sed -r "s/(.*\|)([0-9]{4})\-([0-9]{2})\-([0-9]{2}) ([0-9]{2})\:([0-9]{2})\:([0-9]{2}\.[0-9]{9}).*/\1\2\3\4\5\6\7/g"
Augmentations to r0cr's command:
- Formatted
find -printf
to give human-readable timestamp instead of Unix timestamp
- Used
%y
instead of %Y
in stat
to give human-readable timestamp instead of Unix timestamp
- Piped
sed
to strip extraneous characters from human-readable timestamp output by stat
This gives me:
SymlinkDate|SymlinkPath|TargetPath|TargetDate
The dates are in human readable format: YYYYMMDDHHMMSS.mmmmmmmmm
I don't imagine having sed
all those back refrences is the most efficient method of stripping chars out of the target date, but I couldn't figure out any other regexp for extracting only [0-9\.]. Efficiency isn't terribly important for this particular implementation.
Thank-you!