9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] kfs un-removable file
Date: Mon, 27 Oct 2003 08:35:01 -0500	[thread overview]
Message-ID: <E1AE7WQ-000GOT-5t@t40.swtch.com> (raw)
In-Reply-To: Your message of "Mon, 27 Oct 2003 13:07:01." <282c78e6ec6bc78ab2d7cad2c2466c62@yourdomain.dom>

> Maybe I should just ignore this but I have managed to
> create a file that I cannot remove (under kfs).
>
> I have tried
> 	disk/kfscmd 'remove /usr/steve/work/pcp/e=C2=80=C2=80B'
> and=
> 	disk/kfscmd 'clri /usr/steve/work/pcp/e=C2=80=C2=80B'
> but both of them error with "can't walk e=C2=80=C2=80B"
>
> NB the above where cut and paste so the runes are correct.

I doubt that.  C2 80 is UTF for 0x80, the error rune.
When any of the UTF routines process a bad UTF sequence, they
replace it with the error rune.  So what's really happening,
probably, is that kfs is giving you bad data (not UTF) and
ls is coping.

If you write a program to walk through the directory manually
and call remove on the offending file, you should be fine.
Just avoid all the utf routines (like print!).

Of course, kfs might check that names you give it are okay
UTF, but off the top of my head I don't think it does.

Russ


  reply	other threads:[~2003-10-27 13:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-27 13:07 steve-simon
2003-10-27 13:35 ` Russ Cox [this message]
2003-10-27 15:15   ` C H Forsyth
2003-10-27 16:15     ` ron minnich
2003-10-27 16:02   ` rog
2003-10-27 16:06     ` Scott Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1AE7WQ-000GOT-5t@t40.swtch.com \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).