4 ms·
Linux 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 lin
by disconnected 9y ago
Linux 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.