28 ms·
The main problem of BSD OSes (including FreeBSD and macOS) is that they include different (not 100% compatible) versions of the basic command line tools and the
by qwerty456127 9y ago
The main problem of BSD OSes (including FreeBSD and macOS) is that they include different (not 100% compatible) versions of the basic command line tools and the GNU versions usually are better.
- jgowdy 9y agoAnd the main solution for that is just install the GNU tools you prefer from ports or packages. Super simple.
- HugoDaniel 9y agoOr read the man pages. Which are better in the BSDs as their target audience tends to prefer proper documentation to google searches.
- fiddlerwoaroof 9y agoThe gnu utilities are fairly well documented in info pages
- mikepurvis 9y agoSure, but that undermines the part of the premise of a BSD-style OS, where you have an "omakase" base system, maintained as a monolith with known and clearly stated assumptions around compatibility and interoperability between the components of the base system.
- HugoDaniel 9y agoExpecting the same tool operation between very different OS's (even if they are all a fork from a common old ancestor) also undermines that premise.
- jgowdy 9y agoYou don’t need to honor the “premise” of the OS, nor do I think the developers of the OS care which software I prefer to run. Run whatever you’re comfortable with. If it was such an issue for them, I’m sure they’d remove the GNU packages they pre-build and host for you. The premise of BSD is you don’t have to use the GNU tools. But they give you the choice.
- disconnected 9y agoLinux distros tend to use the GNU userspace utils (or busybox on embedded systems), while The BSD family uses their own (IIRC, a descendant from the old BSD lineage). The main difference - as I understand it - is that the BSD variants are strictly POSIX compliant, while GNU tools decided to diverge from that behavior (see: POSIXLY_CORRECT, other compatibility flags) for better usability, more features, and so on. So, if anything, it is GNU that is "different" and "incompatible". (Not necessarily a bad thing, mind you)
- qwerty456127 9y ago> So, if anything, it is GNU that is "different" and "incompatible". (Not necessarily a bad thing, mind you) What I mean under "incompatible" is not-supporting everything that the other does. Just couple of trivial examples: `sed -i 's/require/include/' Rakefile` throws `invalid command code R` Mac (you must use `sed -i "" 's/require/include/' Rakefile` instead) and `dd` does not support `status=progress` on Mac so you have to pipe it through `pv` and this is not free in terms of performance.
- sdkmvx 9y agoOn BSD (including Mac OS X), you can also type ^t at dd, and it will print status information. If that doesn't work, do stty status ^t first. This is SIGINFO; it's been in BSD for a long time, but isn't in Linux and is relatively unknown nowadays. Quite a few BSD command line programs will respond to it.
- qwerty456127 9y agoCool! Thanks! This is a thing I wish every program on every OS would support.
- mcguire 9y agoHistorical note: Some of us remember POSIXLY_CORRECT as POSIX_ME_HARDER.
- pjmlp 9y agoBecause they are closer to actual UNIX lineage and POSIX than what GNU tools offer. In some GNU tools we are even required to explicitly enable POSIX compatible behavior. However I do agree that GNU tools are easier to use. Back in the .com days, when I did SunOS administration, they would be one of the first external packages I would install.
- pilif 9y ago>not 100% compatible I would argue it’s the GNU tools that are not 100% compatible. The BSD tools are very much the same as they always have been in Unix of old. GNU was in fact doing what we generally refer to as „embrace and extend“. And now look at how well it has worked: people refer to the original as „not compatible“ Of course it’s not so relevant as the gnu tools are widely available, but it’s in my opinion still an observation of note.
- qwerty456127 9y ago> I would argue it’s the GNU tools that are not 100% compatible. The BSD tools are very much the same as they always have been in Unix of old. Of course, that's the point: the GNU tools undergo relatively active development and grow better while the BSD tools don't.
- gkya 9y agoOr rather: BSD tools are more backwards- and standards-compatible that GNU ones.
- ggm 9y agodate gets me every time (hah). The date -jnu on OSX is incomplete against bad norms. Linux date is exceptionally hard to remember how to back convert date +%s strings to textual forms which bsd date does elegently.
- loeg 9y agoIt is pretty trivial on FreeBSD to 'pkg install coreutils.' Then use the GNU versions of these utilities by prefixing 'g'. I actually alias several utilities to the GNU variants on my FreeBSD systems because I prefer their semantics. (The point of my argument is: this is not an insurmountable problem.)