logoalt Hacker News

mkl • today at 11:48 AM • 2 replies • view on HN

-a

Not sure why you wouldn't want to preserve timestamps, links, etc. by default.


Replies

JdeBP • today at 12:12 PM

This is rather missing the point. The headlined article isn't really about how to achieve a goal, but about the weird history and evolution of a tool that leads us to the rather odd situation that we are in today. And it's far from being the only tool that has a weird history, that looks rather nutty if one looks at it from the point of view of a novice having to learn this stuff.

It's also not even completely covering the weird case of -r and -R for the cp command. On HP-UX, for example, the twain were different, but not in the way that they were in old GNU Core Utilities. That would be too easy. (-:

The AIX manual for cp explains its difference between -r and -R:

* https://ibm.com/docs/en/aix/7.1.0?topic=c-cp-command

Illumos also treats the two differently, but in a subtly different way:

* https://illumos.org/man/1/cp

➕ show 1 reply
emmelaich • today at 12:21 PM

old cp didn't have `-a`

Anyway, just use rsync.

➕ show 1 reply