From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 00:23:12 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 BD96C16A4B3 for ; Tue, 23 Sep 2003 00:23:12 -0700 (PDT) Received: from sally.edelkey.net (sally.edelkey.net [213.138.147.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id C24D843F75 for ; Tue, 23 Sep 2003 00:23:10 -0700 (PDT) (envelope-from mikael.karlsson@hel.fi) Received: from stadi-fsin (213138134154.edelkey.net [213.138.134.154]) by sally.edelkey.net (8.12.10/8.12.10) with SMTP id h8N7N84H020993 for ; Tue, 23 Sep 2003 10:23:09 +0300 Received: from [137.163.173.140]:48699 (EHLO ema.hel.fi) Internet Mail 6.0.35 Release) with SMTP; Tue, 23 Sep 2003 07:16:49 -0000 Received: from ema.hel.fi (ema.hel.fi [137.163.173.140]) by ema.hel.fi (8.11.7+Sun/8.11.2) with ESMTP id h8N7Mt514593 for ; Tue, 23 Sep 2003 10:22:55 +0300 (EEST) X-Map-MIXER-Originators: false To: freebsd-questions@freebsd.org From: "Karlsson Mikael HKI/SOSV" MIME-Version: 1.0 Date: 23 Sep 2003 10:21:00 +0300 Envelope-ID: JA8AAAAAAgQSHwABYQADV7qgzdhU@master.hel.fi Message-Id: In-Reply-To: <20030922160116.GB34858@happy-idiot-talk.infracaninophile.co.uk> References: <20030922085416.605aca6b.cpressey@catseye.mine.nu> <20030922160116.GB34858@happy-idiot-talk.infracaninophile.co.uk> X-Mailer: TeamWARE Connector for MIME Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: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: Tue, 23 Sep 2003 07:23:12 -0000 Matthew Seaman wrote (22.9.2003 19:01): > >Have you tried typing 'ls -G' using the system ls(1) recently=3F > Yes, I have and I even have it aliased in my .bashrc file like this "alias ls=3D'ls -F -G'" so that ls will always use colors and type endings.=20But= my point was that native BSD system ls only colors these types, outclip from man pag= es: 1. directory 2. symbolic link 3. socket 4. pipe 5. executable 6. block special 7. character special 8. executable with setuid bit set 9. =20 executable with setgid bit set 10. directory writable to others, with sticky bit 11. directory writable to others, without=20sticky bit which are all supported in for example GNU/Linux ls, except 10 and 11, but= then they have an extra option to put=20different coloring on files with a speci= al ending. So that archives, moviefiles, soundfiles etc. have a special color while in BSD they're all grey/white. I know that this might seem like irritating for some and unnecessary for ot= hers but shouldn't people be given the possibility to choose for themselves and= not by the big people if they want to use colors on special file endings. And= I'm in no way saying that it has to come on at the same time as the normal colo= ring. But wouldn't it be time for people to try to expand their minds on how to= make BSD a little more friendly to others then unixpros and "hackers". > a good=20start. And while we're on the subject of different file types why >> doesn't ls support coloring of different file types like in Linux. As it would >> make finding certain files easier by coloring them differently depending= on >> their ending. >> > >Doesn't it=3F How many file types do you want to make different colors= =3F >Anyway, that seems to depend on shell. I can get color differences. > Well it might be dependent on the shell as I'm not sure about it, but as I already wrote above I think it should be up to the user to decide how many different filetype colors should be used and not to some BSD developer to= say "NO, won't happen!" cause he doesn't like the idea. He should say "Hey, that might be a good idea, why not try to see if it's possible to do." or "Sure,= why not, the public should get what they want.". This is exactly why open-source was started so that the people would have the power to decide what they want and not some money obsessed Gates. But it seems that development on FreeBSD= has taken a turn towards dictator reign or maybe always been that way. >> >> Other *NIX systems seem to have done this to their cat program so why >> >> can't FreeBSD=3F >> > >> >See above. > >FreeBSD has a better view of the world than some of=20the kiddie OSes. > Yes, you're absolutly right that FreeBSD has a better view of the world then other OSes. But what says that there couldn't be a flag that either allowes= or doesn't allow cat to read directories and maybe other files. As somebody sa= id cat only has a few flags so far. This way cat would be able to fill both experts and newbies wishes and needs. Then FreeBSD would really have a bett= er view on the world than GNU/Linux as it can't cat directories at all but Fre= eBSD users would be able=20to decide if they want it to be possible or not by si= mply using a flag. >Just because another OS takes the wrong road doesn't mean that FreeBSD >should also get lost. > No, I agree but wouldn't it be better if a few small things like what this topic has been about could be solved rationaly. Just so that FreeBSD wouldn= 't get on the wrong road but still satisfy both experts=20and newbies. I think= my suggestion about a flag to cat would be a solution and that file-ending coloring in ls wouldn't lead FreeBSD straight in to the woods, as it would= be possible to turn on/off these features on demand. > >Modifying cat so it couldn't do this would not be an improvement. > Yes, it would if it was possible to turn it on with a flag. > >"cat /bin" on Solaris 9 does exactly the same thing as on FreeBSD; shows >the contents of the directory, just like you're asking it to. Just because >you can't fathom a use for this behavior doesn't mean it's wrong. If >you don't want to see it, don't ask "cat" to show it to you. > OK, as I said that I was only 90% sure that it wouldn't do that. But the th= ing is that I don't have a problem with using cat, but the people I help do. The thing is that most books on *NIX systems start out with simple commands lik= e=20ls and cat. Most of the people I help think it's the only way to read files an= d by mistake specify a directory insted of a file or just for fun test it out on= a directory. Then their problem becomes my problem as their terminal locks.