Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2002 21:41:39 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Unix Tools <unixtools@hotmail.com>
Cc:        Brian McCann <bjm1287@ritvax.rit.edu>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Slightly OT: How to remove an odd file...
Message-ID:  <20021014184139.GB684@hades.hell.gr>
In-Reply-To: <OE21zQJMj9E0MqFmD2T0000d633@hotmail.com>
References:  <004101c272c2$b27b1d70$1500a8c0@dogbert> <OE21zQJMj9E0MqFmD2T0000d633@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-10-14 10:02, Unix Tools <unixtools@hotmail.com> wrote:
> "Brian McCann" <bjm1287@ritvax.isc.rit.edu> 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




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