X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1D44D3858C39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1665754651; bh=O+Oi9bnInXS1/fXaa6EB8hW0j/KdnfczjF8BB059AqE=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kls29q9TNyd3edNaLdJRItfAMy2fWXPFYAhv+y1n92N5JUihDz+G4QYQ5ApjKVPUY 3Jc7uiItgx10Tb+cXeUd0uixMBz5Tf1nZox3BRRplXVzKyry2JPhsnPraSRPOKBVaj bg9gUK4HIgGOFYPfTBYBit8tJEx6dEa/74kRNzCE= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6033D3858C83 X-mail-filterd: {"version":"1.5.1", "queueID":"4MpnTv522sz10MQS", "contextId":"2968bf92-dcb3-460b-a6a8-c75f0bce74b5"} X-mail-filterd: {"version":"1.5.1", "queueID":"4MpnTv3T6Bz10MQR", "contextId":"401edb8a-62a7-4240-a11d-f2f538b6e946"} X-lpn-mailing: LEGIT X-lpn-spamrating: 40 X-lpn-spamlevel: not-spam Message-ID: Date: Fri, 14 Oct 2022 15:36:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 Subject: Re: When only rsync will do .. or maybe not Content-Language: fr To: cygwin AT cygwin DOT com References: Organization: ACME In-Reply-To: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrille Lefevre via Cygwin Reply-To: Cyrille Lefevre Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 29EDbrOK015341 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 Regards, /me -- mailto:Cyrille DOT Lefevre-lists AT laposte DOT net -- 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