X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41C483858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=schaeffler.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=schaeffler.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N0YYmiSgijlfXXyAklvUjzCaQpk1JwSGNzWbRiiXbuGtcf4jwK/LhUfxxtqUHdTxUmNZyGTGyIskiZk1pY15yDCuktFZVRoPZ9suBE4fVU5sUnSNyX7MVLdHt3L5PGKBTcexKDLxU88WCLEPGnpCK9nEYQiCXeEGRLhTIliGpWoWfPu75QHOcM9PnNhDujODXWw5XuqoxGntS1eAgsRw0IdAaoZbtkfmJBX/hZ7VdqZqAXz8G9iE9W64H6KzSLO6rHCoapA82Jkefowx8KpdIbv2lD4OjtOAm+ocpPqxBJFO0VJpXX2RZsow/txQonmPVZB5a0Isn5leKEG0i58hpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hjl7tfFiHskpDuVh8tH/4The+qCr6leLCSdsspOe4xA=; b=Dp/0PZdr/oUX2Xl963uGqJHYJtrdjlYu1MCv08f14yZOdzY01kz63oPfjoBkd95gk83Po7cf6uq4UZPCMOm5VcceVaL+ExdSagp9MPH4/Dz4X5SP6NFo66j1rAHPrclc9Wr1hkuc1C98P0pyC3q7NHcDnbCsJYKbpEP3Zdfol9f0cuhYsaZkPUugIG9vTKoD1rkhssfTV+v2Uy6P+yGoU1c1Lo70qIa2YB4AGNAlUGW1Evqrl/iDaTMuDxzyjD5OhuTt0LKFpj8NInFKDsion2X70tGx+FVtsCcTLIRRiK5pehp3BhJhnfUFCFO/74ps+K0TJW6hsFY2/KD++fBSpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=schaeffler.com; dmarc=pass action=none header.from=schaeffler.com; dkim=pass header.d=schaeffler.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worksite.onmicrosoft.com; s=selector2-worksite-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hjl7tfFiHskpDuVh8tH/4The+qCr6leLCSdsspOe4xA=; b=VEcV/tNnQmHfyZhF7VeSEyupkOJnyiq8qTsGYk116Tcpmvc0tmvctsAehAYYRNDZokFVPURVvgMRAA6GqZaSxG7Y4uZyafjHNLJ45w8s7+vb980i8eR6W4G3AW3NZBHEtW8zn2lnu7liTtiAC0pBXkXa+hKkD1esedDPKsjYjZM= From: "Lemke, Michael SF/HZA-ZE2E" To: "cygwin AT cygwin DOT com" Subject: RE: When only rsync will do .. or maybe not Thread-Topic: When only rsync will do .. or maybe not Thread-Index: AQHY39IB87J4HTqIUkutMRQE8JnvMa4OAhFw Date: Fri, 14 Oct 2022 15:35:13 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=schaeffler.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXPR03MB7714:EE_|AM7PR03MB6280:EE_ x-ms-office365-filtering-correlation-id: 203828e7-a300-4a54-4071-08daadf9b00d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aVfwDdC8wb4jSUW+FQST+I6FThz+SYKuuM7+MNwp4GfsPL/Y8NXc535+fMQ+lqNbUqXdEm7eVnRNWoLjavwto9KjH8q9CbsIdxGXb+4cnjHzA1FTwZ+BB0fn0Idylpg4ihFgMvYlMLObOzHLrLqDQ0Ve4tb8fE295Fo0laYj3lvN+u+u4tBDP0t8pUzXTD92d/cItrIWkGMGM1dIvVz2Sv5j+NyI6wTTjLMW2OmJwctsXXue8DYBNF3yWCIIUP2RE1uLYku/1thMLYxWt7Jdl1A9aa8fe4xV2zQueUdoLbvtww7r0wSwRt7CXVkFJgI/zLP9/u4+Vx/yj18kkXVbsU78sFJZbPyvyk6jbyxQwqp5H6/th5nWEKoZwMgas8Q5ETN0BnC3i+0iJjd/0jA2VYB0PkuUOS/exu1nMlj5Ii0HdKWqdtBJOGhbtV9YsQJwAp5u+qAnOJWrt18UOiVb7YK8ujwVRernATiY+mWhqBQUnec45jEAI8kOSFU43xNWnj6pddMeyPhK3ti4jTmpZOPKN51aeQ9jvrGhgLCFjyZ3oEMhuNC7AIlEkZJHro1pVqyQzxHA2CM/riat9JsL0qVlE17JBQBc1W1Wnn/aoxz0IsP50x/t3WQ4ak1Op7LCUiA8e3HYXKVJNJXg9M43nVid0UUWpAR2gS5zqHoesfv61JgSvUWna8KrWTGsTigNAZxIobBk/BdbVUN0cRLJNZHFvMNF0y/gjAMm8+RSvMACtfDRmwoudBYD0Mr3oManD3pZoYPHTCwkNQ7ARWgx+w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR03MB7714.eurprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(346002)(136003)(396003)(366004)(376002)(451199015)(6506007)(186003)(55016003)(66574015)(26005)(83380400001)(5660300002)(9686003)(8936002)(7696005)(478600001)(64756008)(2906002)(71200400001)(66446008)(41300700001)(76116006)(66556008)(66946007)(52536014)(82960400001)(316002)(66476007)(6916009)(8676002)(33656002)(86362001)(38070700005)(38100700002)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?TVR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3RiZHpZckth?= =?utf-8?B?R2pTUEQwVWhtSFd2NUtIV2oxQVB5S1ozOHpIN2ZNalB3Y0dmTVlXNkRHcURi?= =?utf-8?B?UzZtd3VIQkxGaXd3V0FQQjlsam9kTXZUR0V6R1JZMW5jOWsra3ZKcjgyS0Jn?= =?utf-8?B?aU5xVTBHQjEyTVgrYUlmcXNjZmE2eDhuODNzTVp3NjBNMGJrZnQzb2F1Zk4y?= =?utf-8?B?LzQveVBkQWRHSlpnSHA0dWZyQXRUMEhyVjNwWVVjTzgvUzFmak45QlJ4NFpE?= =?utf-8?B?c0YyczVZTE9xejkyY2V5aFA2ZmQwdEJPcWN3cmxJR241K0RCbVRZYVZINTBQ?= =?utf-8?Q?FwkGCvyt1C6C6TvOL/EcbGiCT?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR03MB7714.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 203828e7-a300-4a54-4071-08daadf9b00d X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2022 15:35:13.7998 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 67416604-6509-4014-9859-45e709f53d3f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: IXM5nF2qkSu3Zfk8rn9goW15kFBwOlDK+p34PogWBWVkoNiWIpV0SHNu+ELl2egTmXFYzcVnHzroPolw88GRuQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR03MB6280 X-OriginatorOrg: schaeffler.com X-MailControlDKIMCheck: cGFzcyB3b3Jrc2l0ZS5vbm1pY3Jvc29mdC5jb20gW3Bhc3Nd X-MailControl-OutInfo: MTY2NTc2MTcxNTpGUEtleTEucHJpdjo5eb91jFETE4QLrXkyKiLuR+fLw0b253Os/Yfh2zTSOzb9NrZaYNAOJ//E66kRjGgLsX122FekbjBp8Y5/Cy7nLzqjWvYmwtyDJRG+w3Zti/UAlNqXvJl1un076BU314kN6YI8fqDKhFyTBgjI7Ef7g91z8SwPOKSRouisOFd8BaqJdDwlSL13WDghO7aJ+/9l6xVh2byBcmZGAUu0/l1UsZKnQWKQd3Ph968FcPtP8NVkLqNhiApVcXC2p/6/0CYM3HgRKxrhjKl1bggWfJ+IlCDlWwRJFIYeDKuYBvBnkwFTAhT1WdHR1Rw+A4Wf2aWHAH1ZWZCYm8ngkLbO7Y2g X-Scanned-By: MailControl 44278.2134 (www.mailcontrol.com) on 10.74.0.117 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 29EFabgu005817 On October 14, 2022 3:36 PM Cyrille Lefevre wrote: >Le 12/10/2022 à 12:55, Fergus Daly a écrit : >> Requirement: to move some selected files and folders under /folder1/ to /folder2/, preserving full pathnames. >> >> Using cp with the switch --parents (taking care over syntax and importantly location $PWD) it is possible to _copy_ the >> Required content across from /folder1/ to /folder2/ but there does not seem to be a matching switch for mv that would >> achieve the same purpose. >> >> One solution would be (i) to copy the required content to /folder2/ and then (ii) delete the identical content under /folder1/; >> but this is expensive (one might not even have the disk space to do it) and it seems seriously unsatisfactory and not without risk >> to have to copy folders and files (possibly huge) when all one wants to do is to change the {pathname} to them. >> >> Question 1 >> Would the command (or something like it, again with care over syntax and $PWD) >> $ rsync -axuv --progress {pathto}/folder1/{content} {pathto}/folder2/ >> do the trick? Or is the very existence of the switch >> $ rsync -axuv --remove-source-files --progress {pathto}/folder1/{content} {pathto}/folder2/ >> indicative that here too the "move" is achieved through a two-stage "copy-then-delete" operation? >> >> Question 2 >> If rsync can provide a genuine "move" capability then is installing the rsync package adequate to the purpose; >> or would librsync-devel and/or librsync2 packages need to be installed also? >> >> Question 3 >> If not rsync, is there any operation for which "move" can be achieved without involving "copy-then-delete"? >> >> Thank you for any assistance. >> >> > >Hi, > >how about find /source | cpio -pdml /target >alternative, cp -alu --parent /source /target >then purge /source > Another idea: instead of copies create hardlinks in /folder2 (ln without -s) and then use 'find /folder1 -links 2 ...' to remove the originals. Exact syntax left as an exercise to the reader. Method is a little fragile if hardlinks exist in /folder1. Use with caution. Additional space required is just the directory entries. Michael -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple