From owner-freebsd-questions Mon Oct 14 11:41:40 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF9DE37B401 for ; Mon, 14 Oct 2002 11:41:39 -0700 (PDT) Received: from nic.upatras.gr (nic.upatras.gr [150.140.129.30]) by mx1.FreeBSD.org (Postfix) with SMTP id 7CD6643EA3 for ; Mon, 14 Oct 2002 11:41:38 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: (qmail 20753 invoked from network); 14 Oct 2002 18:34:36 -0000 Received: from upnet-dialinpool-99.upnet.gr (HELO hades.hell.gr) (@150.140.128.155) by nic.upatras.gr with SMTP; 14 Oct 2002 18:34:36 -0000 Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.6/8.12.6) with ESMTP id g9EIfg1H001981; Mon, 14 Oct 2002 21:41:42 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by hades.hell.gr (8.12.6/8.12.6/Submit) id g9EIffQE001980; Mon, 14 Oct 2002 21:41:41 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 14 Oct 2002 21:41:39 +0300 From: Giorgos Keramidas To: Unix Tools Cc: Brian McCann , freebsd-questions@FreeBSD.ORG Subject: Re: Slightly OT: How to remove an odd file... Message-ID: <20021014184139.GB684@hades.hell.gr> References: <004101c272c2$b27b1d70$1500a8c0@dogbert> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-10-14 10:02, Unix Tools wrote: > "Brian McCann" wrote: > > I've got an interesting question for you all. I've got a file who's > > name is " "...3 blank spaces. It shows up when I do an ls -la, and I > > can get it's inode # (it's in RedHat...a box I'm going to convert to > > FreeBSD real soon)...does anyone know how to remove a file based off of > > an inode #? > > cd to the directory where the file exists > write a perl script > > #!/usr/bin/perl > unlink " "; > exit(0); Or use quoting properly on the command line: # rm " " That seems a bit faster, and requires no Perl knowledge. Giorgos. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message