From owner-freebsd-stable Mon Apr 30 11:53:41 2001 Delivered-To: freebsd-stable@freebsd.org Received: from scully.zoominternet.net (scully.zoominternet.net [63.67.120.3]) by hub.freebsd.org (Postfix) with SMTP id 5410937B424 for ; Mon, 30 Apr 2001 11:53:39 -0700 (PDT) (envelope-from dmmiller@cvzoom.net) Received: (qmail 13718 invoked from network); 30 Apr 2001 18:52:25 -0000 Received: from acs-24-154-37-140.zoominternet.net (HELO cvzoom.net) (24.154.37.140) by scully.zoominternet.net with SMTP; 30 Apr 2001 18:52:25 -0000 Message-ID: <3AEDB4B0.15C7C43F@cvzoom.net> Date: Mon, 30 Apr 2001 14:53:36 -0400 From: Donn Miller X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: art@pilikia.net Cc: freebsd-stable@freebsd.org Subject: Re: tail References: <200104300841220210.0C7DBEE8@smtp> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Arthur W. Neilson III" wrote: > > This very functionality, being able to cat a directory, saved my butt some years > ago on an unfamiliar sys5r2 box which had crashed and no filesystem but root > would mount. ls wasn't in the path and I remembered I could use cat dirname as > a crude ls in order to navigate. This helped me find fsck in an obscure directory > and repair the hosed filesystems and recover the system. Yeah, and you can do cat dirname | strings; it works a little better. Another potential use for this would be to see which files have not yet been flushed from the disk by the "rm" command. For example, if you remove several files from "dirname" via rm, and are running softupdates, you can see if the data is still on the disk by doing "cat dirname | strings". Similarly, if you had a large number of files in dirname, you could use tail to see the last 10 files physically on the disk. But the best use for tail on a directory would be tail -f dir | strings to see the files as they are being written to disk, and compare the output to "ls dir" to see how often files are being written/flushed. It would be to check softupdates performance, for example. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message