From owner-freebsd-hackers@FreeBSD.ORG Thu May 5 12:24:27 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D5D116A4CE for ; Thu, 5 May 2005 12:24:27 +0000 (GMT) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F28D843DBA for ; Thu, 5 May 2005 12:24:26 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1DTfOz-0005Sw-OS for freebsd-hackers@freebsd.org; Thu, 05 May 2005 15:24:25 +0300 X-Mailer: exmh version 2.7.0 06/18/2004 with nmh-1.0.4 To: freebsd-hackers@freebsd.org In-Reply-To: Message from Erik Udo of "Thu, 05 May 2005 14:53:47 +0300." <427A094B.8040009@dnainternet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 05 May 2005 15:24:25 +0300 From: Danny Braniss Message-ID: Subject: Re: req: New feature to rm? Remove file by the inode number X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 12:24:27 -0000 > 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. my .5$ danny