From owner-freebsd-questions Mon Jun 24 16:05:45 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA22228 for questions-outgoing; Mon, 24 Jun 1996 16:05:45 -0700 (PDT) Received: from twwells.com (twwells.com [199.79.159.1]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA22222 for ; Mon, 24 Jun 1996 16:05:41 -0700 (PDT) Received: by twwells.com (Smail3.1.29.1 #8) id m0uYKg5-00017rC; Mon, 24 Jun 96 19:04 EDT To: freebsd-questions@freebsd.org From: bill@twwells.com (T. William Wells) Subject: Re: int link(const int inode, const char *name2) Date: 24 Jun 1996 19:04:14 -0400 Lines: 12 Message-ID: <4qn6te$rmi@twwells.com> References: <1.5.4.32.19960625181506.00384450@dogbert.systems.sa.gov.au> NNTP-Posting-Host: localhost.twwells.com Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In article <1.5.4.32.19960625181506.00384450@dogbert.systems.sa.gov.au>, Garth T Kidd 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.