Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2005 14:32:19 +0200
From:      Wilko Bulte <wb@freebie.xs4all.nl>
To:        Danny Braniss <danny@cs.huji.ac.il>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: req: New feature to rm? Remove file by the inode number
Message-ID:  <20050505123219.GA1039@freebie.xs4all.nl>
In-Reply-To: <E1DTfOz-0005Sw-OS@cs1.cs.huji.ac.il>
References:  <427A094B.8040009@dnainternet.net> <E1DTfOz-0005Sw-OS@cs1.cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 05, 2005 at 03:24:25PM +0300, Danny Braniss wrote..
> > Julien Gabel wrote:
> > >>>I couldn't find a way to remove files that had scandic/non-printable
> > >>>letters, then i remembered ls showed inode number of the file. Is it
> > >>>possible to remove the file by the inode number? It would be a
> > >>>useful feature :)
> > >>>
> > >>>I bet there is a way to remove those files, but only
> > >>>third party programs came to my mind.
> > > 
> > > 
> > > I think the -inum option of the find(1) utility can do the trick.
> > > 
> > 
> > After trying clri, maybe find(1) is a better way :). I can imagine what 
> > would happen when i would use clri on wrong slice :)
> 
> i haven't seen/used clri in years (maybe decades), but if memory doesn't fail,
> clri just zeroes the inode, the blocks are not returned to the freelist!
> and if it's a directory things can get nasty.

man clri(8) tells you all about that.. 

-- 
Wilko Bulte				wilko@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050505123219.GA1039>