Date: Tue, 25 Jun 1996 00:18:21 -0300 (EST) From: Joao Carlos Mendes Luis <jonny@gaia.coppe.ufrj.br> To: terry@lambert.org (Terry Lambert) Cc: garth@dogbert.systems.sa.gov.au, questions@freefall.freebsd.org Subject: Re: int link(const int inode, const char *name2) Message-ID: <199606250318.AAA19340@mailhost.coppe.ufrj.br> In-Reply-To: <199606242306.QAA02616@phaeton.artisoft.com> from Terry Lambert at "Jun 24, 96 04:06:23 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
#define quoting(Terry Lambert) // > [This is on a BSDI machine, but BSDI and FreeBSD are at least half-brothers, // > so here goes...] // > // > 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? // // Ghah. // // You could manually mung the directory. This will create a reference, but does not increment the inode refcount. // If you were root and manually munged the directory it used to live in // by using a binary editor on the block device (assuming it wasn't truncated Can still be done, if you edit the block device to change the file's inode and increment refcount. // and nothing was created in its slot), then all you'd have to do is adjust // the end pointer: ... // It is easy to damage an FS this way. Sure ! This is not child's play. :) Jonny -- Joao Carlos Mendes Luis jonny@gta.ufrj.br +55 21 290-4698 ( Job ) jonny@cisi.coppe.ufrj.br Network Manager UFRJ/COPPE/CISI Universidade Federal do Rio de Janeiro
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606250318.AAA19340>