logoalt Hacker News

mqus • today at 11:11 AM • 3 replies • view on HN

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


Replies

olowe • today at 11:21 AM

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 • today at 11:36 AM

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)

➕ show 1 reply
dotancohen • today at 12:03 PM

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