[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how do i extract a bullet from my foot (tar woes)



On Tue, 21 Aug 2001, Karsten M. Self wrote:

> I'm trying to remember a trick (probably in O'Reilly's _UNIX Power
> Tools_) for removing files by inode.  Trying to remember what it was or
> in what context it worked.  

Unmount the filesystem, then do

wh@frodo:~ > /sbin/debugfs
debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
debugfs:  open -w /dev/device_with_file_system
debugfs:  clri <11>
debugfs:  quit

wh@frodo:~ > /sbin/e2fsck -f /dev/device_with_file_system
e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Entry 'random name' in / (2) has deleted/unused inode 11.  Clear<y>? yes
...

Use the inode number of the file you want to clear instead of 11.

Walter



Reply to: