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

Kamal R. Prasad kamalpr at yahoo.com
Thu May 5 09:30:58 PDT 2005


--- Simon Roberts <thorpflyer at yahoo.com> wrote:
> A couple of observations:
> 
[snip]

[snip]
> 
> 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.

> Cheers,
> Simon
> 
> 
> --- Raymond Wiker <Raymond.Wiker at fast.no> wrote:
> > Erik Udo writes:
> >  > I couldn't find a way to remove files that had
> > scandic/non-printable
> >  > letters, then i remembered ls showed inode
> number
> > of the file. Is it 
> >  > possible to remove the file by the inode
> number?
> > It would be a
> >  > useful feature :)
> >  > 
> >  > I bet there is a way to remove those files, but
> > only
> >  > third party programs came to my mind.
> > 
> >         How about rm -i ./*?
> > 
The POSIX std requires -i to be used for 'interactive'
(and even if it didn't that is already the case on
most unix systems).

regards
-kamal

> > _______________________________________________
> > freebsd-hackers at freebsd.org mailing list
> >
>
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to
> > "freebsd-hackers-unsubscribe at freebsd.org"
> > 
> 
> 
> 		
> __________________________________ 
> Yahoo! Mail Mobile 
> Take Yahoo! Mail with you! Check email on your
> mobile phone. 
> http://mobile.yahoo.com/learn/mail 
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to
> "freebsd-hackers-unsubscribe at freebsd.org"
> 

------------------------------------------------------------
Kamal R. Prasad
UNIX systems consultant 
kamalp at acm.org

In theory, there is no difference between theory and practice. In practice, there is:-).
------------------------------------------------------------


		
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html



More information about the freebsd-hackers mailing list