Date: Mon, 30 Apr 2001 14:53:36 -0400 From: Donn Miller <dmmiller@cvzoom.net> To: art@pilikia.net Cc: freebsd-stable@freebsd.org Subject: Re: tail Message-ID: <3AEDB4B0.15C7C43F@cvzoom.net> References: <200104300841220210.0C7DBEE8@smtp>
next in thread | previous in thread | raw e-mail | index | archive | help
"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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AEDB4B0.15C7C43F>