GNU bug report logs - #9611
Copy an item with its parent directory

Previous Next

Package: coreutils;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Tue, 27 Sep 2011 13:25:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 9611-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Peng Yu <pengyu.ut <at> gmail.com>
Cc: 9611-done <at> debbugs.gnu.org
Subject: Re: bug#9611: Copy an item with its parent directory
Date: Tue, 27 Sep 2011 14:29:07 +0100
tags 9611 notabug

On 09/27/2011 02:23 PM, Peng Yu wrote:
> Hi,
> 
> Suppose I have a file 'a/b/c/d/e/f', I want to copy it to 'target'
> with the parent 'd/e'. I.e., the resulted file is 'target/d/e/f'.
> 
> I can make a bash script to do so, but I wondering if there is an
> existing command or option. Thanks!
> 

(cd a/b/c && cp --parents d/e/f /path/to/target)

cheers,
Pádraig.




This bug report was last modified 13 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.