https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240146

            Bug ID: 240146
           Summary: 'man cp' does not discuss extended attributes; it
                    really should since even -p discards them!
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Manual Pages
          Assignee: b...@freebsd.org
          Reporter: s...@rogue-research.com
                CC: d...@freebsd.org

The man page for 'cp' does not contain the word "extended" nor "attribute".

I was very surprised to see that even 'cp -p' apparently does not preserve the
extended attributes of a file.

I'd argue 'cp -p' behaviour is wrong, but at the very least it should be
documented.

By contrast, the macOS 10.13 man page says: "-p    Cause cp to preserve the
following attributes of each source file in the copy: modification time, access
time, file flags, file mode, user ID, and group ID, as allowed by permissions. 
Access Control Lists (ACLs) and Extended Attributes (EAs), including resource
forks, will also be preserved."

A simple sentence to warn that cp -p will blow away EAs would help.  We're
talking about data loss here. :(

example:

root@freenas[/test]# lsextattr user A.txt 
A.txt   DosStream.com.apple.TextEncoding:$DATA  DosStream.AFP_Resource:$DATA   
DosStream.AFP_AfpInfo:$DATA     DOSATTRIB      
DosStream.com.apple.lastuseddate#PS:$DATA


root@freenas[/test]# cp -a A.txt A2.txt      


root@freenas[/test]# lsextattr user A2.txt
A2.txt

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to