From owner-freebsd-hackers@FreeBSD.ORG Thu May 5 17:59:14 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 8239516A4CE for ; Thu, 5 May 2005 17:59:14 +0000 (GMT) Received: from biltens.etika.net (mail.etikaweb.net [65.75.141.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45AB443D9B for ; Thu, 5 May 2005 17:59:14 +0000 (GMT) (envelope-from halil@enderunix.org) Received: from [81.213.121.187] (helo=[192.168.7.100]) by biltens.etika.net with esmtp (Exim 4.44) id 1DTkcf-0002gb-KE; Thu, 05 May 2005 20:58:59 +0300 From: Halil Demirezen Organization: Enderunix To: freebsd-hackers@freebsd.org, jpeg@thilelli.net Date: Thu, 5 May 2005 20:58:11 +0000 User-Agent: KMail/1.7 References: <20050505163054.27317.qmail@web52709.mail.yahoo.com> <64693.192.168.1.20.1115312127.squirrel@webmail.thilelli.net> In-Reply-To: <64693.192.168.1.20.1115312127.squirrel@webmail.thilelli.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505052058.12220.halil@enderunix.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - biltens.etika.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - enderunix.org X-Source: X-Source-Args: X-Source-Dir: 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 17:59:14 -0000 My point of view is if you add inode removing option to the rm you'll have to add en extra parameter, that is on which *filesystem*. For example, rm -x 2 /var, ---- i am supposing -x as the option for removing inodes ---- is removing inode number 2 on file system /var So the pattern seems to be a little confusing since, at a first glance, it looks like you are removing /var directory. Some dummy users may or may not be confused. Because of general purpose of rm is basically removing directory entries, Adding an extra inode option and specifying a pattern as above is a little misaiming of rm. No necessasity. We'd better let third programs achieve such a will. "clri" and "find" will be sufficient. Sincerely. P.S: What i've written above is not related to the replied message. I only replied to be in the thread. On Thursday 05 May 2005 16:55, Julien Gabel wrote: > >> Point 2, likely as not, might explain why there's no > >> simple mechanism for doing this from rm. At the very > >> least you'd have to specify the file system you're > >> referring to, and many "plain" users couldn't do > >> that safely. Those that can are probably able to use > >> find anyway. > > > > A (device no, inode no) can uniquely identify a file > > -but then it requires the same amt of traversals (from > > the root directory's inode) that any other utility > > does. Im not sure rm can optimize anything that a find > > .. -exec rm {} \; would. > > Or "find [...] -print | xargs \rm" to bypass some problem > with a very long list of files to delete.