[Bug 240146] 'man cp' does not discuss extended attributes; it really should since even -p discards them!
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Aug 27 15:59:19 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240146
Conrad Meyer <cem at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cem at freebsd.org
Status|New |Open
--- Comment #1 from Conrad Meyer <cem at freebsd.org> ---
Yeah, it's unfortunate! Totally agree we should at a minimum document the gap.
cp(1) is an old tool and long predates extended attributes in FreeBSD.
FWIW, POSIX 1003.1-2017 cp(1) also does not mention extattrs at all:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html
GNU cp only touches on it obliquely:
http://man7.org/linux/man-pages/man1/cp.1.html
> -a, --archive
> same as -dR --preserve=all
... ^^^^^^^^^^^^
> -p same as --preserve=mode,ownership,timestamps
>
> --preserve[=ATTR_LIST]
> preserve the specified attributes (default:
> mode,ownership,timestamps), if possible additional attributes:
> context, links, xattr, all
^^^^^
(And note that even GNU cp's bare '-p' option does NOT preserve extattrs; you
need to pass '-a'.)
So this is a valid doc bug, but could also be filed as a Base system / bin bug
to add the missing support.
As a workaround, tar(1) can be used to copy extended attributes (--xattrs).
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-doc
mailing list