[PLUG] Creating a filename for an open, but deleted, file

Russell Senior russell at personaltelco.net
Fri Nov 14 18:48:17 UTC 2014


> On Fri, Nov 14, 2014 at 1:46 AM, Russell Senior
> <russell at personaltelco.net> wrote:
> >   [I am assuming the following, correct as necessary: the inode is
> >    from a filesystem from /dev/sda1 and $inode is the numeric value of
> >    the inode, and you run this all from the mount point of the
> >    filesystem (the tmpname will get created in the root directory of
> >    the mounted filesystem), and permname is a path on the same
> >    filesystem.  You'll need to be root.]
> >
> > *** BE VERY CAREFUL! ***
> >
> >   # cd /mountpoint_of_dev_sda1
> >   # debugfs -w /dev/sda1
> >   debugfs 1.42.9 (4-Feb-2014)
> >   debugfs:  ln <$inode> tmpname
> >   debugfs:  quit
> >   # ln tmpname permname
> >   # debugfs -w /dev/sda1
> >   debugfs 1.42.9 (4-Feb-2014)
> >   debugfs:  unlink tmpname
> >   debugfs:  quit
> >
> > *** BE VERY CAREFUL! ***
> 
> Thanks.  I'll give that a shot on a cloud instance and post what I discover.

Note, you need the < > literally to distinguish the filespec as an
inode number and not a filename.  So inode 12345 would be specified
as, literally:

  ln <12345> tmpname

and not

  ln 12345 tmpname


-- 
Russell Senior, President
russell at personaltelco.net



More information about the PLUG mailing list