From owner-freebsd-questions Wed Jul 17 14:58: 5 2002 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 6B57937B400 for ; Wed, 17 Jul 2002 14:58:02 -0700 (PDT) Received: from catflap.home.slightlystrange.org (host217-39-153-84.in-addr.btopenworld.com [217.39.153.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF4FD43E5E for ; Wed, 17 Jul 2002 14:58:01 -0700 (PDT) (envelope-from dan@slightlystrange.org) Received: from danielby by catflap.home.slightlystrange.org with local (Exim 3.36 #1) id 17Uwny-0000yO-00 for questions@freebsd.org; Wed, 17 Jul 2002 22:57:54 +0100 Date: Wed, 17 Jul 2002 22:57:54 +0100 From: Daniel Bye To: questions@freebsd.org Subject: Re: "^L" File, needs to be Removed Message-ID: <20020717215754.GE634@catflap.home.slightlystrange.org> Reply-To: dan@slightlystrange.org Mail-Followup-To: questions@freebsd.org References: <002501c22dd9$27a47e40$7b01a8c0@afi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002501c22dd9$27a47e40$7b01a8c0@afi> User-Agent: Mutt/1.4i X-Scanner: exiscan *17Uwny-0000yO-00*/ZpepFDSBac* (SlightlyStrange.org) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jul 17, 2002 at 05:30:21PM -0400, lists@brenius.com wrote: > server /etc/namedb/ # ls -la |more > total 970 > -rw-r--r-- 1 bind bind - 552 Aug 8 2000 ^L > drwxr-xr-x 2 bind wheel - 10240 Jul 17 17:06 ./ > drwxr-xr-x 19 root wheel - 2560 Jul 17 17:20 ../ > > Can only be opened via (editor of choice) ?, e.g. pico ? > > The file contains a zone file, from ages ago, but the original zone file is fine and > is still there. > > Even after a quick secondary backup of the whole directory, I am hesitant to > perform a rm ? because the directory contains 100's of critical zone files. > > Any safe way to remove it and why sometimes after an ls -la the file comes up > as ^L and other times ? and only can be opened when you specify ? # rm -i -- ? The -i will at least prompt you before deleting the file, in case you change your mind or you have multiple files in the directory with a single character name. (Although, as I just found when I made a file called "^L", your shell will likely interpret it as the "clear screen" character, so you won't actually see the confirmation message from rm anyway! Should have seen that one coming...) Incidentally, the "--" trick works with less, and various others, too. It shows up in directory listings as "?" because that is the default action for ls when it encounters a non-printing character and the output stream is attached to stdout. You can use ls -B to show the characters' octal value, or ls -b to display them, where possible, as C escape characters. Dan -- Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message