9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] file creation time
@ 2009-01-22 17:39 lucio
  2009-01-22 17:43 ` erik quanstrom
  0 siblings, 1 reply; 12+ messages in thread
From: lucio @ 2009-01-22 17:39 UTC (permalink / raw)
  To: 9fans

Does Plan 9 really not provide for file creation?

	typedef
	struct Dir {
		/* system-modified data */
		ushort	type;	/* server type */
		uint	dev;	/* 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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 17:39 [9fans] file creation time lucio
@ 2009-01-22 17:43 ` erik quanstrom
  2009-01-22 17:50   ` lucio
  2009-01-22 19:01   ` Charles Forsyth
  0 siblings, 2 replies; 12+ messages in thread
From: erik quanstrom @ 2009-01-22 17:43 UTC (permalink / raw)
  To: lucio, 9fans

On Thu Jan 22 12:41:10 EST 2009, lucio@proxima.alt.za wrote:
> Does Plan 9 really not provide for file creation?
>
> 	typedef
> 	struct Dir {
> 		/* system-modified data */
> 		ushort	type;	/* server type */
> 		uint	dev;	/* 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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 17:43 ` erik quanstrom
@ 2009-01-22 17:50   ` lucio
  2009-01-22 17:57     ` andrey mirtchovski
                       ` (2 more replies)
  2009-01-22 19:01   ` Charles Forsyth
  1 sibling, 3 replies; 12+ messages in thread
From: lucio @ 2009-01-22 17:50 UTC (permalink / raw)
  To: 9fans

> 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.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 17:50   ` lucio
@ 2009-01-22 17:57     ` andrey mirtchovski
  2009-01-22 18:08     ` erik quanstrom
  2009-01-22 18:16     ` roger peppe
  2 siblings, 0 replies; 12+ messages in thread
From: andrey mirtchovski @ 2009-01-22 17:57 UTC (permalink / raw)
  To: lucio, Fans of the OS Plan 9 from Bell Labs

On Thu, Jan 22, 2009 at 10:50 AM,  <lucio@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?
>

history(1)

http://plan9.bell-labs.com/magic/man2html?man=history&sect=1



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 17:50   ` lucio
  2009-01-22 17:57     ` andrey mirtchovski
@ 2009-01-22 18:08     ` erik quanstrom
  2009-01-22 18:16     ` roger peppe
  2 siblings, 0 replies; 12+ messages in thread
From: erik quanstrom @ 2009-01-22 18:08 UTC (permalink / raw)
  To: lucio, 9fans

On Thu Jan 22 12:54:14 EST 2009, lucio@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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 17:50   ` lucio
  2009-01-22 17:57     ` andrey mirtchovski
  2009-01-22 18:08     ` erik quanstrom
@ 2009-01-22 18:16     ` roger peppe
  2009-01-22 18:20       ` lucio
  2009-01-22 18:21       ` erik quanstrom
  2 siblings, 2 replies; 12+ messages in thread
From: roger peppe @ 2009-01-22 18:16 UTC (permalink / raw)
  To: lucio, Fans of the OS Plan 9 from Bell Labs

2009/1/22  <lucio@proxima.alt.za>:
> 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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 18:16     ` roger peppe
@ 2009-01-22 18:20       ` lucio
  2009-01-22 20:35         ` Charles Forsyth
  2009-01-22 18:21       ` erik quanstrom
  1 sibling, 1 reply; 12+ messages in thread
From: lucio @ 2009-01-22 18:20 UTC (permalink / raw)
  To: 9fans

> 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




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 18:16     ` roger peppe
  2009-01-22 18:20       ` lucio
@ 2009-01-22 18:21       ` erik quanstrom
  2009-01-22 19:31         ` Richard Miller
  1 sibling, 1 reply; 12+ messages in thread
From: erik quanstrom @ 2009-01-22 18:21 UTC (permalink / raw)
  To: 9fans

On Thu Jan 22 13:17:59 EST 2009, rogpeppe@gmail.com wrote:
> 2009/1/22  <lucio@proxima.alt.za>:
> > 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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 17:43 ` erik quanstrom
  2009-01-22 17:50   ` lucio
@ 2009-01-22 19:01   ` Charles Forsyth
  1 sibling, 0 replies; 12+ messages in thread
From: Charles Forsyth @ 2009-01-22 19:01 UTC (permalink / raw)
  To: 9fans

> Does Plan 9 really not provide for file creation?
no, but it wasn't really creation on unix but inode change.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 18:21       ` erik quanstrom
@ 2009-01-22 19:31         ` Richard Miller
  2009-01-22 19:54           ` erik quanstrom
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Miller @ 2009-01-22 19:31 UTC (permalink / raw)
  To: 9fans

> will the real creation time please stand up.

October 23, 4004 BC.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 19:31         ` Richard Miller
@ 2009-01-22 19:54           ` erik quanstrom
  0 siblings, 0 replies; 12+ messages in thread
From: erik quanstrom @ 2009-01-22 19:54 UTC (permalink / raw)
  To: 9fans

On Thu Jan 22 14:33:05 EST 2009, 9fans@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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] file creation time
  2009-01-22 18:20       ` lucio
@ 2009-01-22 20:35         ` Charles Forsyth
  0 siblings, 0 replies; 12+ messages in thread
From: Charles Forsyth @ 2009-01-22 20:35 UTC (permalink / raw)
  To: lucio, 9fans

>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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-01-22 20:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 17:39 [9fans] file creation time lucio
2009-01-22 17:43 ` erik quanstrom
2009-01-22 17:50   ` lucio
2009-01-22 17:57     ` andrey mirtchovski
2009-01-22 18:08     ` erik quanstrom
2009-01-22 18:16     ` roger peppe
2009-01-22 18:20       ` lucio
2009-01-22 20:35         ` Charles Forsyth
2009-01-22 18:21       ` erik quanstrom
2009-01-22 19:31         ` Richard Miller
2009-01-22 19:54           ` erik quanstrom
2009-01-22 19:01   ` Charles Forsyth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).