|
From: | John Ogness |
Subject: | Re: [Dazuko-help] filesize=0 |
Date: | Wed, 30 Mar 2005 10:29:37 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 |
T.Aonuma wrote:
I want to backup a file before change of a file. I want to back up to the timing by which the file was opened by "RW MODE". However, to this timing, file size is recognized to be 0. Also by investigation by "fstat", file size is recognized to be 0. Which timing is good?
On OPEN is good. If "p" already exists (and has content), then file size will be more than 0. In your example "p" did not exist, which is why the file size was 0.
For example, when I run: $ vi /etc/hosts I see:OPEN uid:1000 pid:1988 mode:438 flags:0 file_uid:0 file_gid:0 file_device:774 file_size:551 file:/etc/hosts
CLOSE uid:1000 pid:1988 file:/etc/hosts Since the file already existed (with content), I see a file size larger than 0. John Ogness -- Dazuko Maintainer
[Prev in Thread] | Current Thread | [Next in Thread] |