delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/10/14/09:38:11

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: <b50fe687-f868-ae14-b683-7b2baf48c755@laposte.net>
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
To: cygwin AT cygwin DOT com
References: <DB6P18901MB0055D8029AD580DE9D4AB12FA4229 AT DB6P18901MB0055 DOT EURP189 DOT PROD DOT OUTLOOK DOT COM>
Organization: ACME
In-Reply-To: <DB6P18901MB0055D8029AD580DE9D4AB12FA4229@DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM>
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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Cyrille Lefevre via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Cyrille Lefevre <cyrille DOT lefevre-lists AT laposte DOT net>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019