Date: Thu, 5 May 2005 15:22:01 -0700 From: John-Mark Gurney <gurney_j@resnet.uoregon.edu> To: Julien Gabel <jpeg@thilelli.net> Cc: freebsd-hackers@freebsd.org Subject: Re: req: New feature to rm? Remove file by the inode number Message-ID: <20050505222201.GB2670@funkthat.com> In-Reply-To: <64693.192.168.1.20.1115312127.squirrel@webmail.thilelli.net> References: <20050505163054.27317.qmail@web52709.mail.yahoo.com> <64693.192.168.1.20.1115312127.squirrel@webmail.thilelli.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050505222201.GB2670>