Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2005 09:30:54 -0700 (PDT)
From:      "Kamal R. Prasad" <kamalpr@yahoo.com>
To:        simon.roberts@earthlink.net, freebsd-hackers@freebsd.org
Subject:   Re: req: New feature to rm? Remove file by the inode number
Message-ID:  <20050505163054.27317.qmail@web52709.mail.yahoo.com>
In-Reply-To: 6667

next in thread | raw e-mail | index | archive | help

--- Simon Roberts <thorpflyer@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@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@freebsd.org mailing list
> >
>
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to
> > "freebsd-hackers-unsubscribe@freebsd.org"
> > 
> 
> 
> 		
> __________________________________ 
> Yahoo! Mail Mobile 
> Take Yahoo! Mail with you! Check email on your
> mobile phone. 
> http://mobile.yahoo.com/learn/mail 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to
> "freebsd-hackers-unsubscribe@freebsd.org"
> 

------------------------------------------------------------
Kamal R. Prasad
UNIX systems consultant 
kamalp@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



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