Warum `cp -R` die bessere Wahl als `cp -r` ist

cp: -r or -R?

In GNU coreutils sind `-r` und `-R` heute identisch, doch das war nicht immer so: Der erste Commit von 1992 zeigt unterschiedliches Verhalten. OpenBSD und NetBSD unterscheiden bis heute, und POSIX.1-2024 empfiehlt `-R` für Konsistenz mit anderen Utilities wie `chown`. Ein kurzer Ausflug in die Geschichte einer scheinbar banalen Option.

Earlier versions of this standard included support for the `-r` option to copy file hierarchies. The `-r` option is historical practice on BSD and BSD-derived systems. This option is no longer specified by POSIX.1-2024 but may be present in some implementations.

Mehr von diesem Tag

2026-10-03