Skip site navigation (1)Skip section navigation (2)
Date:      24 Jun 1996 19:04:14 -0400
From:      bill@twwells.com (T. William Wells)
To:        freebsd-questions@freebsd.org
Subject:   Re: int link(const int inode, const char *name2)
Message-ID:  <4qn6te$rmi@twwells.com>
References:  <1.5.4.32.19960625181506.00384450@dogbert.systems.sa.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <1.5.4.32.19960625181506.00384450@dogbert.systems.sa.gov.au>,
Garth T Kidd  <garth@dogbert.systems.sa.gov.au> wrote:
: I've accidentally unlinked a file (or rather, had it unlinked for me by gzip
: -- still my mistake) from the directory it was in.  The file is, however,
: still open.  If I can get the inode (downloading lsof now), is it possible
: to link it to the directory again?

When you unlink a file, the inode doesn't get modified, except to
update the link count (and inode modification time). If you crash
your machine by hitting reset, the inode will still be on disk but
with a zero reference count. In _theory_ fsck will detect this
and put the file in lost+found.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4qn6te$rmi>