From owner-freebsd-questions@FreeBSD.ORG Mon Sep 22 08:51:55 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 AC84316A4C1 for ; Mon, 22 Sep 2003 08:51:55 -0700 (PDT) Received: from priv-edtnes10-hme0.telusplanet.net (outbound02.telus.net [199.185.220.221]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF34643FE0 for ; Mon, 22 Sep 2003 08:51:53 -0700 (PDT) (envelope-from cpressey@catseye.mine.nu) Received: from kallisti.ca ([207.81.23.108]) by priv-edtnes10-hme0.telusplanet.netSMTP <20030922155152.VOCV17782.priv-edtnes10-hme0.telusplanet.net@kallisti.ca>; Mon, 22 Sep 2003 09:51:52 -0600 Date: Mon, 22 Sep 2003 08:54:16 -0700 From: Chris Pressey To: freebsd-questions@freebsd.org Message-Id: <20030922085416.605aca6b.cpressey@catseye.mine.nu> In-Reply-To: References: <20030919083627.K99065@wonkity.com> Organization: Cat's Eye Technologies X-Mailer: Sylpheed version 0.9.4 (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: mikael.karlsson@hel.fi 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 15:51:55 -0000 X-List-Received-Date: Mon, 22 Sep 2003 15:51:55 -0000 On 22 Sep 2003 09:06:00 +0300 "Karlsson Mikael HKI/SOSV" wrote: > [...] > Ruben de Groot wrote (19.9.2003 13:34): > > > >So why don't you for example alias cat to cat -v in your system > >profile and login scripts? This will display non-printing characters > >so they are visible and don't mangle terminal settings. > > 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!!! Mikael, Please understand that FreeBSD is more oriented towards classicists, luddites, and other sticks-in-the-mud, than propellerhead "early adopter" users-to-be-friendly-to. (At least, it used to be; I honestly have no idea what's going on in 5.x these days.) Anyway, why not write a script for these users along the lines of: #!/usr/bin/perl foreach $f (@ARGV) { if (-d $f) { print "cat: $f: is a directory\n"; exit 1; } } system "cat @ARGV"; Also, I believe 'GNU ls', in the ports, supports coloured directory listings. -Chris