Date: Mon, 22 Sep 2003 17:37:20 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: mikael.karlsson@hel.fi Cc: freebsd-questions@freebsd.org Subject: Re: Cat a directory Message-ID: <20030922172730.J22516@wonkity.com> In-Reply-To: <20030922085416.605aca6b.cpressey@catseye.mine.nu> References: <JA8AAAAAAgH8RAABYQADV7qgzdhU@master.hel.fi> <20030919083627.K99065@wonkity.com> <20030922085416.605aca6b.cpressey@catseye.mine.nu>
next in thread | previous in thread | raw e-mail | index | archive | help
"Karlsson Mikael HKI/SOSV" <mikael.karlsson@hel.fi> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030922172730.J22516>