From owner-freebsd-hackers@FreeBSD.ORG Thu May 5 16:39:24 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C88FA16A4CE for ; Thu, 5 May 2005 16:39:24 +0000 (GMT) Received: from oslex.fast.no (pat-gw.osl.fast.no [217.144.235.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1C5D43DBC for ; Thu, 5 May 2005 16:39:23 +0000 (GMT) (envelope-from Raymond.Wiker@fast.no) Received: from oslex01.ad.fast.no ([192.168.0.70]) by oslex.fast.no with Microsoft SMTPSVC(6.0.3790.211); Thu, 5 May 2005 18:39:22 +0200 Received: from raw.grenland.fast.no.fast.no ([192.168.48.104]) by oslex01.ad.fast.no with Microsoft SMTPSVC(6.0.3790.211); Thu, 5 May 2005 18:39:21 +0200 From: Raymond Wiker MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17018.19512.466180.930081@raw.grenland.fast.no> Date: Thu, 5 May 2005 18:39:20 +0200 To: kamalp@acm.org In-Reply-To: <20050505163054.27317.qmail@web52709.mail.yahoo.com> References: <20050505163054.27317.qmail@web52709.mail.yahoo.com> X-Mailer: VM 7.17 under 21.4 (patch 16) "Corporate Culture" XEmacs Lucid X-OriginalArrivalTime: 05 May 2005 16:39:21.0854 (UTC) FILETIME=[FD6851E0:01C55190] cc: freebsd-hackers@freebsd.org cc: simon.roberts@earthlink.net Subject: Re: req: New feature to rm? Remove file by the inode number X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 16:39:24 -0000 Kamal R. Prasad writes: > > > --- Raymond Wiker 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.