Re: File server with creation-date field support
You may have to write something yourself to do this. There is no easy way as far as i am aware. Others will correct me if i am ill informed.
Originally Posted by HugoRune
Actually this is not true. Certainly ext4 stores the file creation time (crtime) but there is no easy way to get to it.
I know that linux filesystems only store modified-date and last-accessed-date, so there is no easy way to preserve this information. Is there a workaround for that?
Take a look at this.
You can get a files creation time using debugfs, however this is not exactly straight forward.
matthew@matthew-Aspire-7540:~$ sudo debugfs -R "stat /home/matthew/examples.desktop" /dev/sda2
debugfs 1.42 (29-Nov-2011)
Inode: 159041 Type: regular Mode: 0644 Flags: 0x80000
Generation: 1786925867 Version: 0x00000000:00000001
User: 1000 Group: 1000 Size: 179
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 8
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x4f05d402:e179809c -- Thu Jan 5 16:46:58 2012
atime: 0x4f466a18:9564497c -- Thu Feb 23 16:32:24 2012
mtime: 0x4f05d402:e179809c -- Thu Jan 5 16:46:58 2012
crtime: 0x4f05d402:e179809c -- Thu Jan 5 16:46:58 2012
Size of extra inode fields: 28
None of the standard commands currently return the crtime as far as i am aware. Certainly they never used to.
In summation, you can get the creation time but you may have to do some work to get it and that you will have to write your self.
Can i have the wooden spoon ?
Bonus if that workaround works with encFS on the underlying file system.
Last edited by matt_symes; February 24th, 2012 at 01:59 AM.
Reason: Made the reply more succinct
If you believe everything you read, you better not read. ~ Japanese Proverb
If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain