From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9CAAB13838B for ; Wed, 17 Sep 2014 23:14:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DD8A5E0B5C; Wed, 17 Sep 2014 23:14:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D7F3E0B19 for ; Wed, 17 Sep 2014 23:14:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id CC8093402D1 for ; Wed, 17 Sep 2014 23:14:46 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Flag: NO X-Spam-Score: -1.149 X-Spam-Level: X-Spam-Status: No, score=-1.149 tagged_above=-999 required=5.5 tests=[AWL=0.206, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.653, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=unavailable Received: from smtp.gentoo.org ([IPv6:::ffff:127.0.0.1]) by localhost (smtp.gentoo.org [IPv6:::ffff:127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uuQPZM77ahhQ for ; Wed, 17 Sep 2014 23:14:40 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 553DC33FFB1 for ; Wed, 17 Sep 2014 23:14:38 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XUOQl-0003e2-Do for gentoo-user@gentoo.org; Thu, 18 Sep 2014 01:14:35 +0200 Received: from a88-112-8-51.elisa-laajakaista.fi ([88.112.8.51]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Sep 2014 01:14:35 +0200 Received: from jouni.kosonen by a88-112-8-51.elisa-laajakaista.fi with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Sep 2014 01:14:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Jouni Kosonen Subject: [gentoo-user] Re: copy file and preserve ownership Date: Thu, 18 Sep 2014 02:14:20 +0300 Message-ID: References: <20140917225407.GD24503@syscon7> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: a88-112-8-51.elisa-laajakaista.fi User-Agent: KNode/4.14.1 X-Archives-Salt: e880db24-0865-4ba9-8a79-1a9c57d83752 X-Archives-Hash: ccfb8a88ace619b9b1a4e66fa8deabcf 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