* [gentoo-user] copy file and preserve ownership
@ 2014-09-17 22:54 Joseph
2014-09-17 23:14 ` [gentoo-user] " Jouni Kosonen
2014-09-18 5:26 ` [gentoo-user] " Alan McKinnon
0 siblings, 2 replies; 4+ messages in thread
From: Joseph @ 2014-09-17 22:54 UTC (permalink / raw
To: gentoo-user
I like to use meld to copy file but meld does now preserve ownership of the file that it copy.
rsyc does but how do I use rysnc to copy let say file that are newer then certain date ?
I was trying to use:
find /home/myuser/oldir/* -mtime -60 -exec cp {} /home/myuser/newdir/ \;
but cp does not preserve file ownership either.
I was planning on copying hylafax-files (faxes) from one server to another and most of those files have ownership "uucp:60002 or "uucp:uucp"
--
Joseph
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-user] Re: copy file and preserve ownership
2014-09-17 22:54 [gentoo-user] copy file and preserve ownership Joseph
@ 2014-09-17 23:14 ` Jouni Kosonen
2014-09-17 23:25 ` Joseph
2014-09-18 5:26 ` [gentoo-user] " Alan McKinnon
1 sibling, 1 reply; 4+ messages in thread
From: Jouni Kosonen @ 2014-09-17 23:14 UTC (permalink / raw
To: gentoo-user
Joseph wrote:
> I like to use meld to copy file but meld does now preserve ownership of
> the file that it copy. rsyc does but how do I use rysnc to copy let say
> file that are newer then certain date ?
>
> I was trying to use:
> find /home/myuser/oldir/* -mtime -60 -exec cp {} /home/myuser/newdir/ \;
>
> but cp does not preserve file ownership either.
>
> I was planning on copying hylafax-files (faxes) from one server to another
> and most of those files have ownership "uucp:60002 or "uucp:uucp"
>
From "man cp":
...
-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
Might I suggest a pattern here? ;-)
---
Jouni
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Re: copy file and preserve ownership
2014-09-17 23:14 ` [gentoo-user] " Jouni Kosonen
@ 2014-09-17 23:25 ` Joseph
0 siblings, 0 replies; 4+ messages in thread
From: Joseph @ 2014-09-17 23:25 UTC (permalink / raw
To: gentoo-user
On 09/18/14 02:14, Jouni Kosonen wrote:
>Joseph wrote:
>
>> I like to use meld to copy file but meld does now preserve ownership of
>> the file that it copy. rsyc does but how do I use rysnc to copy let say
>> file that are newer then certain date ?
>>
>> I was trying to use:
>> find /home/myuser/oldir/* -mtime -60 -exec cp {} /home/myuser/newdir/ \;
>>
>> but cp does not preserve file ownership either.
>>
>> I was planning on copying hylafax-files (faxes) from one server to another
>> and most of those files have ownership "uucp:60002 or "uucp:uucp"
>>
>
>From "man cp":
>...
>
> -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
>
>
>Might I suggest a pattern here? ;-)
>---
>Jouni
Thank, missed that :-/
--
Joseph
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] copy file and preserve ownership
2014-09-17 22:54 [gentoo-user] copy file and preserve ownership Joseph
2014-09-17 23:14 ` [gentoo-user] " Jouni Kosonen
@ 2014-09-18 5:26 ` Alan McKinnon
1 sibling, 0 replies; 4+ messages in thread
From: Alan McKinnon @ 2014-09-18 5:26 UTC (permalink / raw
To: gentoo-user
On 18/09/2014 00:54, Joseph wrote:
> I like to use meld to copy file but meld does now preserve ownership of
> the file that it copy.
> rsyc does but how do I use rysnc to copy let say file that are newer
> then certain date ?
>
> I was trying to use:
> find /home/myuser/oldir/* -mtime -60 -exec cp {} /home/myuser/newdir/ \;
>
> but cp does not preserve file ownership either.
Basic Unix principle:
Only root can do it because a regular user cannot chown an object
cp -a
or
cp -pr
>
> I was planning on copying hylafax-files (faxes) from one server to
> another and most of those files have ownership "uucp:60002 or "uucp:uucp"
>
--
Alan McKinnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-18 5:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 22:54 [gentoo-user] copy file and preserve ownership Joseph
2014-09-17 23:14 ` [gentoo-user] " Jouni Kosonen
2014-09-17 23:25 ` Joseph
2014-09-18 5:26 ` [gentoo-user] " Alan McKinnon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox