Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2005 18:39:20 +0200
From:      Raymond Wiker <Raymond.Wiker@fast.no>
To:        kamalp@acm.org
Cc:        simon.roberts@earthlink.net
Subject:   Re: req: New feature to rm? Remove file by the inode number
Message-ID:  <17018.19512.466180.930081@raw.grenland.fast.no>
In-Reply-To: <20050505163054.27317.qmail@web52709.mail.yahoo.com>
References:  <20050505163054.27317.qmail@web52709.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Kamal R. Prasad writes:
 > 
 > > --- 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).

        That's exactly the way I meant this to be used... if you use
the command "rm -i ./*" you will be asked for each file whether you
want to remove it (except for files beginning with ".", of course).

        I don't see this as more cumbersome than using "ls -i" to get
a list of inodes, and then using clri or whatever to remove the inode;
which operation is probably the wrong solution anyway, as there may be
other directory entries that point to the same inode, and which should
be allowed to do so even after the unwanted directory entries have
been removed.



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