dazuko-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dazuko-help] filesize=0


From: John Ogness
Subject: Re: [Dazuko-help] filesize=0
Date: Wed, 30 Mar 2005 08:32:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

T.Aonuma wrote:
> When treating the file which has already existed, file size is displayed 
> as zeri.
> For example, it is a time of opening by vi.
> 
> -- 
> OPEN  uid=0 pid=1633 mode=384 flags=32962 file_uid=0 file_gid=0 
> file_device=2049 file_size=0 file=/root/test2/.p.swp
> -- 
> 
> It is size zero when "OPEN" a "p.swp".
> This can be understood.
> 
> -- 
> OPEN  uid=0 pid=1633 mode=438 flags=33345 file_uid=0 file_gid=0 
> file_device=2049 file_size=0 file=/root/test2/p
> -- 
> 
> "/root/test2/p"  is existing.
> Why is it file_size=0 ?

This is because the file is first being created when this OPEN occurs. I did
your example and here is the full set of events:

$ vi p
OPEN   uid:1000 pid:1487 mode:384 flags:194 file_uid:1000 file_gid:1000
file_device:774 file_size:0 file:/tmp/dtest/.p.swp
OPEN   uid:1000 pid:1487 mode:384 flags:194 file_uid:1000 file_gid:1000
file_device:774 file_size:0 file:/tmp/dtest/.p.swpx
CLOSE  uid:1000 pid:1487 file:/tmp/dtest/.p.swpx
CLOSE  uid:1000 pid:1487 file:/tmp/dtest/.p.swp
OPEN   uid:1000 pid:1487 mode:384 flags:194 file_uid:1000 file_gid:1000
file_device:774 file_size:0 file:/tmp/dtest/.p.swp

Notice that the file "p" still has not been created. Then I write some text
and exit vi. The following is generated:

OPEN   uid:1000 pid:1487 mode:438 flags:577 file_uid:1000 file_gid:1000
file_device:774 file_size:0 file:/tmp/dtest/p
CLOSE  uid:1000 pid:1487 file:/tmp/dtest/p
CLOSE  uid:1000 pid:1487 file:/tmp/dtest/.p.swp

Here we see that "p" is created, the data is written to the file, and then
it is closed.

If I then look at "p" then I get these events:

$ cat p

OPEN   uid:1000 pid:1723 mode:0 flags:32768 file_uid:1000 file_gid:1000
file_device:774 file_size:5 file:/tmp/dtest/p
CLOSE  uid:1000 pid:1723 file:/tmp/dtest/p

Since the file already exists (with content), we see the file size > 0.


John Ogness

-- 
Dazuko Maintainer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]