The below is a recent patch from plan9port to sam: * https://github.com/9fans/plan9port/commit/d3ee9f70e4ee00bd12557910c9e3dcc1fabd53c7 It fixes a spurious overwrite message. From: Igor Böhm Date: Tue, 05 Oct 2021 09:27:45 +0000 Subject: [PATCH] sam: fix spurious overwrite message (patch from plan9port) Fixes: % sam -d -. w /tmp/foo /tmp/foo: (new file) #0 w /tmp/foo ?warning: write might change good version of `/tmp/foo' --- diff 6ebb8b9e357944cc29ae3fafc0900ee3e325ed39 d05fc0e9d203f79eef0d3fc6ce7edcd493b30101 --- a/sys/src/cmd/sam/io.c Sun Oct 3 17:58:58 2021 +++ b/sys/src/cmd/sam/io.c Tue Oct 5 11:27:45 2021 @@ -66,7 +66,7 @@ warn(Wnotnewline); closeio(n); if(f->name.s[0]==0 || samename){ - if(statfile(name, &dev, &qid, &mtime, 0, 0) > 0){ + if(statfile(genc, &dev, &qid, &mtime, 0, 0) > 0){ f->dev = dev; f->qidpath = qid; f->mtime = mtime; Cheers, Igor