Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 1999 11:05:37 -0700
From:      "David Schwartz" <davids@webmaster.com>
To:        <chris@calldei.com>, <Dean Lombardo <"ayk1 "@ukc.ac.uk>>
Cc:        <stable@FreeBSD.ORG>
Subject:   RE: file disappeared?
Message-ID:  <001301be900f$630f5150$021d85d1@whenever.youwant.to>
In-Reply-To: <19990426120756.C422@holly.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help

	You are expecting 'rm' to do something other than it actually does. All
'rm' does is call 'unlink'. Read the man page for 'unlink' and you should
understand what is happening:

     The unlink() function removes the link named by path from its directory
     and decrements the link count of the file which was referenced by the
     link.  If that decrement reduces the link count of the file to zero,
and
     no process has the file open, then all resources associated with the
file
     are reclaimed.  If one or more process have the file open when the last
     link is removed, the link is removed, but the removal of the file is
de-
     layed until all references to it have been closed.  path may not be a
di-
     rectory.

	DS

> -----Original Message-----
> From: owner-freebsd-stable@FreeBSD.ORG
> [mailto:owner-freebsd-stable@FreeBSD.ORG]On Behalf Of Chris Costello
> Sent: Monday, April 26, 1999 10:08 AM
> To: Dean Lombardo <"ayk1 "@ukc.ac.uk>
> Cc: stable@FreeBSD.ORG
> Subject: Re: file disappeared?
>
>
> On Mon, Apr 26, 1999, Dean Lombardo wrote:
> > The subject says it all:  I removed a file, but according to df, it's
> > still there!
> >
> > pcayk:~/tmp$ df -k .
> > Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
> > /dev/wd0s1f    7621844  6975669    36428    99%    /usr
> >
> > pcayk:~/tmp$ ls -l
> > -rw-r--r--  1 ayk1  users 716247040 Apr 22  1999 bigcdimage.iso
> >
> > pcayk:~/tmp$ rm bigcdimage.iso
> >
> > pcayk:~/tmp$ df -k .
> > Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
> > /dev/wd0s1f    7621844  6975669    36428    99%    /usr
>
>    Try sync(1)?
>
> --
> Chris Costello                                <chris@calldei.com>
> To define recursion, we must first define recursion.
>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001301be900f$630f5150$021d85d1>