Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Mac OS X a long way off from FreeBSD?

Mac OS X a long way off from FreeBSD?
Thread Tools
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Sep 5, 2003, 04:57 PM
 
My FreeBSD system and the Linux systems that I frequently use have many of the `usual' un*x stuff installed. I have noticed something annoying about X: many commands are crippled, which means I cannot use many nifty FreeBSD scripts.

Take df for instance. df -h doesn't work with OS X, the option -h is unknown! Me stupid haven't checked this with Panther which goes a lot more in the standards direction (e. g. using bash instead of tcsh, etc.).

Do any of you notice similar things? If so, post the differences ...
I don't suffer from insanity, I enjoy every minute of it.
     
Senior User
Join Date: Nov 2000
Status: Offline
Reply With Quote
Sep 5, 2003, 08:11 PM
 
Most of the commands which don't support some options on OS X but do on other Unix platforms are simply because Mac OS X is using older versions of those commands. For example, Mac OS X 10.2 had the userland commands primarily based off FreeBSD 4.4. Panther has updated many of them to later versions, from FreeBSD 5 according to Apple.

- proton
     
Moderator
Join Date: May 2001
Location: Hilbert space
Status: Offline
Reply With Quote
Sep 6, 2003, 08:16 AM
 
Yup, I have noticed (while working with Panther) that they have switched to bash, etc. I have just missed to specifically test that. I guess I will do that in two weeks in Paris

No, it's simply annoying, I cannot test my backup scripts on my iBook.
I don't suffer from insanity, I enjoy every minute of it.
     
Senior User
Join Date: Jan 2003
Location: Stuttgart, Germany
Status: Offline
Reply With Quote
Sep 6, 2003, 10:21 AM
 
Originally posted by OreoCookie:
My FreeBSD system and the Linux systems that I frequently use have many of the `usual' un*x stuff installed. I have noticed something annoying about X: many commands are crippled, which means I cannot use many nifty FreeBSD scripts.

Take df for instance. df -h doesn't work with OS X, the option -h is unknown! Me stupid haven't checked this with Panther which goes a lot more in the standards direction (e. g. using bash instead of tcsh, etc.).
Welcome to UNIX, where every vendor supports something different. Take your 'df -h' for example: the '-h' option is a GNUism, which is not present on real UNIX. How about another example? GNU tar can extract bzip2 archives with the 'j' option, BSD tar can not. Or how about colored ls? This has nothing to do with crippling the tools, but with not using the GNU stuff (it's a BSD after all).
Please do also note, that GNU is NOT the "standard" as you put it (this includes things like bash). You'd be hard pressed to find them on a Solaris, AIX or HPUX box. Heck, they don't even come with most BSDs by default.
     
Dedicated MacNNer
Join Date: Nov 2000
Location: Malaysia
Status: Offline
Reply With Quote
Sep 6, 2003, 04:04 PM
 
Originally posted by entrox:
Welcome to UNIX
I would second that comment. HP/UX tar does not even support -z to gunzip.

---gralem
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Sep 6, 2003, 04:32 PM
 
Originally posted by entrox:
Welcome to UNIX, where every vendor supports something different. Take your 'df -h' for example: the '-h' option is a GNUism, which is not present on real UNIX. How about another example? GNU tar can extract bzip2 archives with the 'j' option, BSD tar can not. Or how about colored ls? This has nothing to do with crippling the tools, but with not using the GNU stuff (it's a BSD after all).
Please do also note, that GNU is NOT the "standard" as you put it (this includes things like bash). You'd be hard pressed to find them on a Solaris, AIX or HPUX box. Heck, they don't even come with most BSDs by default.
True... sort of. Every "non-GNU" system I have ever used has had most all of the GNU tools installed on it. This includes Solaris, the BSDs, Irix, AIX. I haven't used any of the others yet. While they may not come with GNU tools as "standard" it seems to be a pretty "standard practice" to install them.

YMMV
-DU-...etc...
     
Senior User
Join Date: Jan 2003
Location: Stuttgart, Germany
Status: Offline
Reply With Quote
Sep 7, 2003, 05:47 AM
 
Originally posted by utidjian:
True... sort of. Every "non-GNU" system I have ever used has had most all of the GNU tools installed on it. This includes Solaris, the BSDs, Irix, AIX. I haven't used any of the others yet. While they may not come with GNU tools as "standard" it seems to be a pretty "standard practice" to install them.
I can certainly understand that. I mean, the GNU tools /are/ usually far better than the vendor supplied ones. It's usually the prohibitive licence, which causes them to be not bundled. I just wanted to clear up the misconception, that the BSD tools are somehow "crippled". They're not - they're just different
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Sep 7, 2003, 10:24 AM
 
Originally posted by entrox:
I can certainly understand that. I mean, the GNU tools /are/ usually far better than the vendor supplied ones. It's usually the prohibitive licence, which causes them to be not bundled. I just wanted to clear up the misconception, that the BSD tools are somehow "crippled". They're not - they're just different
I disagree about the license as the main cause of some or all GNU tools to not be bundled with a given distribution. As I understand it, it is more to do with support. It is very expensive to create and maintain a set of software for any platform. If the vendor bundles certain software with for their platform the customer expects a certain amount of support for that software. This costs the vendor money... which they try to pass on to the customer. Sometimes a certain piece of software is high in demand and the vendor finds it cheaper to both bundle that software and support it rather than write it from scratch themselves.

If you go to http://wwws.sun.com/software/solaris/freeware/
you will see a list of what is bundled with Solaris separated into two columns. One column is bundled and supported and the other is for bundled but unsupported. You can find similar lists at HP, IBM, SGI and even Apple. Please note that these are all, primarily, hardware companies. All of them, with the exception of Apple, have have a hefty chunk of their market in the server space.

I think we will see a trend over time where all of the above companies will go more and more towards an Open Source software based platform for their hardware products. Apple has already done this with Mac OS X/Darwin. Whether HP, IBM, SGI, SUN go more towards BSD and BSD style licensing or Linux with GNU style licensing remains to be seen. IBM seems to be headed in the GNU/Linux direction. It doesn't mean they have to give up their own proprietary additions or layers. For example Apple still has very tight control of their desktop and IBM controls their z/VM. I think we will see more of this not because these companies are feeling all warm and fuzzy about OSS or GNU but because it makes business sense. It is a heckuvalot cheaper to leverage the freely available OSes and tools than it is to make and maintain them all in-house. The licensing really isn't as much of a problem as some people think.

Incidentally, and slightly off topic... there are other reasons to use bash over tcsh. See: http://www.kitebird.com/csh-tcsh-book/csh-whynot
-DU-...etc...
     
Senior User
Join Date: Jan 2003
Location: Stuttgart, Germany
Status: Offline
Reply With Quote
Sep 7, 2003, 12:37 PM
 
Thank you for your elaborate response. You are right of course, but note that I wasn't necessarily only talking about hardware vendors, but also about the other Open Source Unices. The BSDs are complete systems with a supplied userland (unlike Linux). This userland is also BSD-licensed, so it wouldn't make sense to replace it with the GNU tools, as the attraction lies within the more liberal licence and the fact that it is developed as a whole (you can't use GPL'd code in a BSD/X11/MIT environment).

Originally posted by utidjian:
Incidentally, and slightly off topic... there are other reasons to use bash over tcsh. See: http://www.kitebird.com/csh-tcsh-book/csh-whynot
I use neither. Zsh all the way, baby!
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Sep 7, 2003, 03:35 PM
 
Originally posted by entrox:
Thank you for your elaborate response. You are right of course, but note that I wasn't necessarily only talking about hardware vendors, but also about the other Open Source Unices. The BSDs are complete systems with a supplied userland (unlike Linux). This userland is also BSD-licensed, so it wouldn't make sense to replace it with the GNU tools, as the attraction lies within the more liberal licence and the fact that it is developed as a whole (you can't use GPL'd code in a BSD/X11/MIT environment).
Urm... check on the BSDs listed at http://www.bsd.org and you will find that ALL of them come with GNU tools. The only one that is difficult to determine what is include is BSDi. Now they may pick and choose what of GPL licensed software they include as does Linux. Linux comes with a lot of BSD licensed stuff and X11 and MIT and Apache and artistic and... as do most all the Unices. Linux (the kernel) is GPL. Linux (the OS) comes with all sorts of stuff with all sorts of licenses... even proprietary ones. BSD (the kernel) comes with whatever license there is for that flavor (usually BSD) and also comes with lots of other stuff. Correct me if I am mistaken but... most of them are built using gcc which is GPL (including Mac OS X). I doubt you will find a single BSD (or derivatives) that is, in any reasonable sense of the word useable, based completely on non-GPL licensed software.

But for licenses, as with choice of shells, there are plenty to choose from. One can even have mutiple licenses for the same code base all at the same time. And, if you look around, you will find that most all of the Unices bundle together all sorts of software with all sorts of licenses. You are mistaken if you think one can not use GPLed software either binary or code in a different environment. What you can not do is re-license GPLed code under a different license UNLESS you are the sole copyright holder of that particular source OR you can get all the contributing copyright holders to go along with a different license. Apparently the "restrictive" nature of the GPL has not hampered the development of any of the other Unices even if they, more or less, depend on it.

I am not saying which license is better or worse or whether that has anything to do with the quality of the software or its suitability for a particular purpose.
-DU-...etc...
     
P
Moderator
Join Date: Apr 2000
Location: Gothenburg, Sweden
Status: Offline
Reply With Quote
Sep 8, 2003, 09:45 AM
 
Originally posted by utidjian:
Incidentally, and slightly off topic... there are other reasons to use bash over tcsh. See: http://www.kitebird.com/csh-tcsh-book/csh-whynot
All of which relate to

* csh, as opposed to tcsh - only one of the flaws quoted relates to tcsh

* shell scripting, as opposed to interactive use. Mac OS X has always used an sh derived from either zsh or bash for its scripting uses.

Bash is not superior to tcsh as an interactive shell. IMHO, tcsh is a better shell, but that is a matter of preference.

In my slightly fundamentalist view, not even bash should be used for scripting - scripts are for sh (if they must run everywhere) or for perl, python or whatever you prefer (if they don't).

At the time that message was written (almost 10 years ago), some people were still writing shell scripts in csh, since it can be easier to use than sh and is always available. That is not very common nowadays.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:22 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2