Remix.run Logo
▲ mqus 2 hours ago

would you be safe in using --recursive always? (e.g. shell scripts)

▲olowe 2 hours ago | parent | next [-]

There are implementations of cp out in the wild that do not recognise the --recursive flag. OpenBSD was mentioned in the article and there’s also busybox cp https://busybox.net/downloads/BusyBox.html

▲hnfong 2 hours ago | parent | prev | next [-]

Double dash long options are basically a GNU extension. BSD utilities generally don't support them. Apparently macOS does not either (since it's based off of FreeBSD)

▲JdeBP an hour ago | parent [-]

macOS was based off NeXTSTEP, not FreeBSD.

And the received wisdom about long options in the BSDs is a quarter of a century out of date. When the BSDs gained a getopt_long() in their C libraries thanks to Klausner and Baron, long options quietly started appearing. This process has been gradually and quietly on-going for the whole of the 21st century.

▲throw0101a an hour ago | parent [-]

> macOS was based off NextBSD, not FreeBSD.

"NextBSD" was first released in 2015:

* https://en.wikipedia.org/wiki/NextBSD

Over a decade after macOS/Mac OS X was initially released:

> macOS (previously OS X and originally Mac OS X) is a proprietary Unix[7][8] operating system, derived from OPENSTEP for Mach and FreeBSD, which has been marketed and developed by Apple since 2001.

* https://en.wikipedia.org/wiki/MacOS

> Darwin is the core Unix-like operating system of macOS, iOS, watchOS, tvOS, iPadOS, audioOS, visionOS, and bridgeOS. It previously existed as an independent open-source operating system, first released by Apple in 2000. It is composed of code derived from NeXTSTEP, FreeBSD[3] and other BSD operating systems,[7] Mach, and […]

* https://en.wikipedia.org/wiki/Darwin_(operating_system)

I remember reading release notes for FreeBSD in the '00s and seeing the exact same lines in the release notes for earlier versions of OS X.

▲alwillis 18 minutes ago | parent | next [-]

> Darwin is the core Unix-like operating system of macOS

macOS isn't "Unix-like"; it's an Open Group certified UNIX™ [1].

[1]: https://www.opengroup.org/openbrand/register/brand3725.htm

▲JdeBP an hour ago | parent | prev [-]

Bah! Thought NeXTSTEP. Typed NextBSD. Fixed. I've been typing lots of names ending in 'BSD' today. (-:

▲dotancohen an hour ago | parent | prev [-]

I believe that -R is the safe works-as-expected-everywhere option.