Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2005 20:58:11 +0000
From:      Halil Demirezen <halil@enderunix.org>
To:        freebsd-hackers@freebsd.org, jpeg@thilelli.net
Subject:   Re: req: New feature to rm? Remove file by the inode number
Message-ID:  <200505052058.12220.halil@enderunix.org>
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
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.



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