PROBLEM: cp --attributes-only Source Target
results in two files unchanged, where the attributes from Source should be copied to Target.
Attempts to solve: As I have the 8.13 version of coreutils
installed [Aha?], I wonder why this option is mentioned, but doesn't seem to work. No error messages, no nothing, even when running it with --verbose
. The same goes when trying to copy the attributes from various accounts. Nothing.
In cp
's man page I found the option
--attributes-only ->
don't copy the file data, just the attributes
In this answer I found that
With recent versions of GNU coreutils (≥ 8.6), you can use cp --attributes-only to replicate the metadata … of a file on another file without changing the target file's contents.
In another posting, someone mentions to be working in Ubuntu, but then there are remarks that I doesn't work on Mac OS X.
QUESTION: Where am I wrong? Could it be the older version of coreutils - and if so, why is there something documented that doesn't work »now«?