[9fans] file creation time
Does Plan 9 really not provide for file creation? typedef struct Dir { /* system-modified data */ ushort type; /* server type */ uintdev;/* server subtype */ /* file data */ Qid qid;/* unique id from server */ ulong mode; /* permissions */ ulong atime; /* last read time */ ulong mtime; /* last write time */ vlong length; /* file length */ char*name; /* last element of path */ char*uid; /* owner name */ char*gid; /* group name */ char*muid; /* last modifier name */ } Dir; It's been a long time, have I asked this already? ++L
Re: [9fans] file creation time
On Thu Jan 22 12:41:10 EST 2009, lu...@proxima.alt.za wrote: > Does Plan 9 really not provide for file creation? > > typedef > struct Dir { > /* system-modified data */ > ushort type; /* server type */ > uintdev;/* server subtype */ > /* file data */ > Qid qid;/* unique id from server */ > ulong mode; /* permissions */ > ulong atime; /* last read time */ > ulong mtime; /* last write time */ > vlong length; /* file length */ > char*name; /* last element of path */ > char*uid; /* owner name */ > char*gid; /* group name */ > char*muid; /* last modifier name */ > } Dir; > > It's been a long time, have I asked this already? use the dump, luke. ☺ - erik
Re: [9fans] file creation time
> use the dump, luke. ☺ If there was an easy, foolproof way to scan the dump by filename, I presume I could search for the earliest instance and consider that the time of creation. Not entirely viable, is it? I do wonder why this field was sacrificed in the file system(s) and 9P*? Or am I dreaming and the time of creation is just a figment of my imagination? ++L PS: I'm sure your reply was in jest. So, largely, is my query.
Re: [9fans] file creation time
On Thu, Jan 22, 2009 at 10:50 AM, wrote: >> use the dump, luke. ☺ > > If there was an easy, foolproof way to scan the dump by filename, I > presume I could search for the earliest instance and consider that the > time of creation. Not entirely viable, is it? > history(1) http://plan9.bell-labs.com/magic/man2html?man=history§=1
Re: [9fans] file creation time
On Thu Jan 22 12:54:14 EST 2009, lu...@proxima.alt.za wrote: > > use the dump, luke. ☺ > > If there was an easy, foolproof way to scan the dump by filename, I > presume I could search for the earliest instance and consider that the > time of creation. Not entirely viable, is it? it's hard to give a good answer, since i don't know what the goal is. > I do wonder why this field was sacrificed in the file system(s) and > 9P*? > > Or am I dreaming and the time of creation is just a figment of my > imagination? of course on a worm filesystem, you could say that each time a file is modified after it has made it to the worm, it becomes a brand new file. though the qid.path doesn't track this view. the create time would then differ from the mtime by as most the time between dumps. andrey suggests > history(1) history doesn't give creation times. it gives the last mtime before the first dump of the file. the file could be deleted and recreated many times and you'd never know. (unless you were to peek at the qid.path.) but then again, history might be exactly what you're looking for. it usually is for me. - erik
Re: [9fans] file creation time
2009/1/22 : > I do wonder why this field was sacrificed in the file system(s) and > 9P*? useful or not, traditional unix ctime never gave the creation time anyway - it gave inode modification time, which isn't the same thing at all: it's updated when you do a chmod.
Re: [9fans] file creation time
On Thu Jan 22 13:17:59 EST 2009, rogpe...@gmail.com wrote: > 2009/1/22 : > > I do wonder why this field was sacrificed in the file system(s) and > > 9P*? > > useful or not, traditional unix ctime never gave the creation time > anyway - it gave inode modification time, which isn't the > same thing at all: it's updated when you do a chmod. will the real creation time please stand up. - erik
Re: [9fans] file creation time
> useful or not, traditional unix ctime never gave the creation time > anyway - it gave inode modification time, which isn't the > same thing at all: it's updated when you do a chmod. Well, that is understandable, if contrary to the principle of least astonishment. Thank you for that gem, I would never have picked it up without having it pointed out to me. ++L
Re: [9fans] file creation time
> Does Plan 9 really not provide for file creation? no, but it wasn't really creation on unix but inode change.
Re: [9fans] file creation time
> will the real creation time please stand up. October 23, 4004 BC.
Re: [9fans] file creation time
On Thu Jan 22 14:33:05 EST 2009, 9f...@hamnavoe.com wrote: > > will the real creation time please stand up. > > October 23, 4004 BC. so when we add 8-byte times to 9p2010 Tstat and Wstat, we can add a constant ctime field of -188466825600? or should that just be hardcoded? - erik
Re: [9fans] file creation time
>I would never have picked it up without having it pointed out to me. to be fair, in one of the system include files it was commented as ino.h: time_t di_ctime; /* time created */ but it was only a comment. stat(2) was more accurate.