I created an NTFS logical volume on my Linux system for Windows file storage because I want to retain the creation date of my files (I would probably zip them into an archive and then unzip them, though I have no idea if that would work). Does NTFS-3G save the creation date of files on Linux? If so, how do I access it?
Reading this thread, the OP links documentation on NTFS that provides a shell script for finding the creation date. I modified it in an attempt to get the seconds from the hex value, but I believe that I am doing something wrong:
#!/bin/sh
CRTIME=`getfattr -h -e hex -n system.ntfs_times $1 | \
grep '=' | sed -e 's/^.*=\(0x................\).*$/\1/'`
SECONDS=$(($CRTIME / 10000000))
echo `date --date=$SECONDS`
Best Answer
From https://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/#filetimes,
You'll find even more information in there including:
Newer versions of ntfs-3g expose a
ntfs.ntfs_crtime
andntfs.ntfs_crtime_be
attribute.So:
See also:
With older ntfs-3g, this should work:
Or with GNU tools and sub-second precision: