[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9611: Copy an item with its parent directory
From: |
Pádraig Brady |
Subject: |
bug#9611: Copy an item with its parent directory |
Date: |
Tue, 27 Sep 2011 14:29:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
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.