From owner-freebsd-questions@FreeBSD.ORG Mon Sep 22 16:37:22 2003 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 A517816A4B3 for ; Mon, 22 Sep 2003 16:37:22 -0700 (PDT) Received: from wonkity.com (wonkity.com [65.173.111.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id B175B44008 for ; Mon, 22 Sep 2003 16:37:21 -0700 (PDT) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.12.9/8.12.9) with ESMTP id h8MNbKCu022722; Mon, 22 Sep 2003 17:37:20 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.12.9/8.12.9/Submit) with ESMTP id h8MNbK87022719; Mon, 22 Sep 2003 17:37:20 -0600 (MDT) Date: Mon, 22 Sep 2003 17:37:20 -0600 (MDT) From: Warren Block To: mikael.karlsson@hel.fi In-Reply-To: <20030922085416.605aca6b.cpressey@catseye.mine.nu> Message-ID: <20030922172730.J22516@wonkity.com> References: <20030919083627.K99065@wonkity.com> <20030922085416.605aca6b.cpressey@catseye.mine.nu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-questions@freebsd.org Subject: Re: Cat a directory 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: Mon, 22 Sep 2003 23:37:22 -0000 "Karlsson Mikael HKI/SOSV" wrote: > So it's better for a newbie to get understandable jibrish from cat > when run on directories then an error message stating that they are > trying to run cat on a directory like ls says when they try to run ls > on a file. But as I said earlier who cares, right? Other OSs have only > had this for "a couple" of year so why would we!!! This might all be based on a misunderstanding. Using cat on a directory is not producing useless garbage. For example, try cat /etc | hexdump -C # UUOC, I know Section 18.02 in O'Reilly's "Unix Power Tools" (if you don't have it already, get it) describes this in more detail. Modifying cat so it couldn't do this would not be an improvement. I hope this helps, and thanks for giving me the motivation to look it up. -Warren Block * Rapid City, South Dakota USA