[news.sysadmin] Copy preserving access times

kinzler@iuvax.cs.indiana.edu (Steve Kinzler) (09/26/90)

Has anyone got a tool that'll recursively copy a directory preserving
owners, modes, modification and access times, and copy symlinks, not
what they point to?

BSD 4.3 "cp -p" doesn't do owners or symlinks.
"tar xp" doesn't do access times.
GNU tar should do it all, but doesn't always work for me.
"dump | restore" works fine but is overkill and too slow for large filesystems.

Surely some sysadmin somewhere has hacked up something like this,
if necessary?  I'll take patches if copyrights are a concern.

Thanks,

from the brain of Steve Kinzler    /o)\    kinzler@iuvax.cs.indiana.edu
an organ with a mind of its own    \(o/    {ames,rutgers}!iuvax!kinzler

bruce@sonyd1.Broadcast.Sony.COM (Bruce Lilly) (09/28/90)

In article <60349@iuvax.cs.indiana.edu> kinzler@iuvax.cs.indiana.edu (Steve Kinzler) writes:
>Has anyone got a tool that'll recursively copy a directory preserving
>owners, modes, modification and access times, and copy symlinks, not
>what they point to?

I don't know about symlinks, but cpio will handle everthing else
you ask about.
-- 
    Bruce Lilly, Product Manager,        | bruce@sonyd1.Broadcast.Sony.COM
    Digital Television Tape Recording,   | uunet!{sonyusa,vmp}!sonyd1!bruce
    Sony Communications Products Co.,    | lilb@sony.compuserve.com (slow)
    Teaneck, NJ 07666  |  Telephone: 1(201)833-5693   | FAX: 1(201)833-9279

prc@erbe.se (Robert Claeson) (09/29/90)

In a recent article bruce@sonyd1.Broadcast.Sony.COM (Bruce Lilly) writes:

>In article <60349@iuvax.cs.indiana.edu> kinzler@iuvax.cs.indiana.edu (Steve Kinzler) writes:
>>Has anyone got a tool that'll recursively copy a directory preserving
>>owners, modes, modification and access times, and copy symlinks, not
>>what they point to?

>I don't know about symlinks, but cpio will handle everthing else
>you ask about.

Of all the systems I've seen, all the ones that had symbolic links
also had a cpio command that could handle them in the way being asked
for.

-- 
Robert Claeson                  |Reasonable mailers: rclaeson@erbe.se
ERBE DATA AB                    |      Dumb mailers: rclaeson%erbe.se@sunet.se
                                |  Perverse mailers: rclaeson%erbe.se@encore.com
These opinions reflect my personal views and not those of my employer.