Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Feb 2000 11:42:46 -0800
From:      Matthew Hunt <mph@astro.caltech.edu>
To:        Mauricio Marquez <mmarquez@enlace.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: deleting a nasty directory entry
Message-ID:  <20000203114246.A27386@wopr.caltech.edu>
In-Reply-To: <3.0.32.20000203123116.016b1d40@enlace.net>; from mmarquez@enlace.net on Thu, Feb 03, 2000 at 12:31:17PM -0600
References:  <3.0.32.20000203123116.016b1d40@enlace.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 03, 2000 at 12:31:17PM -0600, Mauricio Marquez wrote:

> I went with rm -i * but it says some weird characters (different that what
> appears in the ls display) is a directory. Now there´s no way I can match
> those weird characters to try to do an RMDIR ´weird chars´ and there´s no
> RMDIR -i option.
> 

Hm, maybe the things ls(1) prints as question-marks aren't really
question-marks.  Note that the manual page says:

     -q      Force printing of non-graphic characters in file names as the
             character `?'; this is the default when output is to a terminal.

And then "rm -i" is just spewing the non-graphic ("weird") characters
to the terminal instead of filtering them like ls(1) does.  It's trying
to remove the right thing, but it's a directory, not a regular file.
Try "rm -ri *" and again say "y" to the weird thing.  If there are any
files in the weird directory, it will ask you whether to remove those,
and then it will remove the directory if it's empty.

Just for the heck of it, doing "ls -b" will list the directory using
C-style and octal escape sequences instead of the question marks.  If
you don't know C that may not make any more sense to you, but it should
at least let you see that they aren't really question marks.

Matt

-- 
Matthew Hunt <mph@astro.caltech.edu> * UNIX is a lever for the
http://www.pobox.com/~mph/           * intellect. -J.R. Mashey


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?20000203114246.A27386>