req: New feature to rm? Remove file by the inode number

Halil Demirezen halil at enderunix.org
Thu May 5 10:59:14 PDT 2005


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.


More information about the freebsd-hackers mailing list