From owner-freebsd-questions@FreeBSD.ORG Mon Mar 15 16:45:35 2004 Return-Path: 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 1214116A4CE for ; Mon, 15 Mar 2004 16:45:35 -0800 (PST) Received: from mallard.mail.pas.earthlink.net (mallard.mail.pas.earthlink.net [207.217.120.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD4EE43D2D for ; Mon, 15 Mar 2004 16:45:34 -0800 (PST) (envelope-from walterk1@earthlink.net) Received: from user-12hcobn.cable.mindspring.com ([69.22.97.119] helo=earthlink.net) by mallard.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1B32i6-0001PL-00 for freebsd-questions@FreeBSD.org; Mon, 15 Mar 2004 16:45:34 -0800 Message-ID: <40564E2C.7060706@earthlink.net> Date: Mon, 15 Mar 2004 19:45:32 -0500 From: Walter User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Questions Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Fwd: Re: deleting directories with ??? in name] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2004 00:45:35 -0000 I managed to delete the files by recreating the directory. Not to seem ungrateful, but isn't it a Bad Thing that it is not straightforeward to delete any file on the system (as root, and thwarted merely because of the characters in the name of the file/directory)? I'm not in a position to mangle lynx, but oughtn't it to be able to zap ANY file regardless of its name? (emacs is obtuse to me.) Is this worthy of a PR? Or are there other ways to kill a malconforming file? Why should an annonomous FTP user be able to create a directory tree that the root account of the machine can't traverse and delete normally? (Sigh.) -------- Original Message -------- Subject: Re: deleting directories with ??? in name Erik Trulsson wrote: > On Mon, Mar 15, 2004 at 03:51:37PM -0800, Derrick Ryalls wrote: > >>>I've tried lynx, but it did not display the files. >>>I tried emacs, but I was only able to rename two of the >>>directories to other names I could delete; the other two gave >>>me an error of illegal character. I tried 'rm -i -- ?*' but >>>it didn't find the files. I tried 'find . -inum 146 -delete' >>>but while it gave no error message, the files/directories remain. >>> >>>Help! How do I delete these odd directories? >>>Please CC me in your response as I'm not currently >>>subscribed to the List. >>> >> >>#mkdir dir?me >>#rmdir dir\?me > > > That assumes that filenames actually contain questionmarks. > ls(1) by default displays all unprintable characters as question marks. > To see what the filenames actually are use 'ls -aB'. > > To delete files with strange names you can always do a 'rm -i *' and > answer 'y' only for the weird files. 'rm -i *' returns "no match" 'ls -aB' shows me the file names, but even after carefully typing in what it shows me in an 'rm' command (name in quotes) says not found. There are \216, \235, \237, and \377 characters in the names, if this matters. Thanks.