From owner-freebsd-hackers@FreeBSD.ORG Thu May 5 22:22:10 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 1DF7416A4CE for ; Thu, 5 May 2005 22:22:10 +0000 (GMT) Received: from mail25.sea5.speakeasy.net (mail25.sea5.speakeasy.net [69.17.117.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89D7843D83 for ; Thu, 5 May 2005 22:22:09 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 24733 invoked from network); 5 May 2005 22:22:08 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail25.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 5 May 2005 22:22:08 -0000 Received: from hydrogen.funkthat.com (hktgbs@localhost.funkthat.com [127.0.0.1])j45MM3mo028768; Thu, 5 May 2005 15:22:08 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j45MM20s028767; Thu, 5 May 2005 15:22:02 -0700 (PDT) Date: Thu, 5 May 2005 15:22:01 -0700 From: John-Mark Gurney To: Julien Gabel Message-ID: <20050505222201.GB2670@funkthat.com> Mail-Followup-To: Julien Gabel , freebsd-hackers@freebsd.org References: <20050505163054.27317.qmail@web52709.mail.yahoo.com> <64693.192.168.1.20.1115312127.squirrel@webmail.thilelli.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64693.192.168.1.20.1115312127.squirrel@webmail.thilelli.net> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-hackers@freebsd.org 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 Reply-To: John-Mark Gurney 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 22:22:10 -0000 Julien Gabel wrote this message on Thu, May 05, 2005 at 18:55 +0200: > >> 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. Please make that: find [...] -print0 | xargs -0 rm otherwise whitespace characters can cause problems... of course find does have the -delete option which makes such mangling unnecessary.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."