Copying files - preserving attributes
Submitted by TimBruce on Wed, 2010-01-27 13:00
One way to do this is:
Supposedly, the following will work to copy a file (or group of files) from a directory and preserve the attributes (ownership and permissions).
Thecommand is a copy command designed to copy files into and out of a cpio or tar archive,
automatically preserving permissions, times, and ownership of files and
subdirectories.
An alternative is to use the " option on the cp command.
The "" option of the "" command can be used to preserve attributes.
See
"" or "" for further details.
Of course, don't forget to add the on as well, so it copies all files / directories recursively. So you'd use something like:
