‹ BackHN Continuity

Thread

cp: -r or -R?

127 points · 110 comments · zdw

  1. mqus · · focus · HN ↗
    would you be safe in using --recursive always? (e.g. shell scripts)
    1. hnfong · · focus · HN ↗
      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)
      1. JdeBP · · focus · HN ↗
        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.

        1. throw0101a · · focus · HN ↗
          > macOS was based off NextBSD, not FreeBSD.

          "NextBSD" was first released in 2015:

          * <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;NextBSD" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;NextBSD

          Over a decade after macOS&#x2F;Mac OS X was initially released:

          &gt; 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.

          * <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MacOS" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MacOS

          &gt; 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 […]

          * <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Darwin_(operating_system)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Darwin_(operating_system)

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

          1. alwillis · · focus · HN ↗
            &gt; Darwin is the core Unix-like operating system of macOS

            macOS isn&#x27;t &quot;Unix-like&quot;; it&#x27;s an Open Group certified UNIX™ [1].

            [1]: <a href="https:&#x2F;&#x2F;www.opengroup.org&#x2F;openbrand&#x2F;register&#x2F;brand3725.htm" rel="nofollow">https:&#x2F;&#x2F;www.opengroup.org&#x2F;openbrand&#x2F;register&#x2F;brand3725.htm

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.