coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Advanced syntax for cp --parents


From: Fergus
Subject: RE: Advanced syntax for cp --parents
Date: Mon, 23 Jan 2017 16:43:01 -0000

>> Starting at b3/ I need to copy everything under /b1/b2/b3/b4/b5 to 
>> /{pathname} (i.e. to create /{pathname}/b3/b4/b5 with all descendants).
>> To achieve this I move from present location to /b1/b2 and then use cp 
>> with the switch --parents:
>>   $ cd    /b1/b2
>>   $ cp    -vr    --parents    b3/b4/b5    /{pathname}

> I think the --parents isn't necessary with -r already given (if this is
why you are using it).
> Hence:
>   $ cp    -vr    /b1/b2/b3    /{pathname}
> should create b3 in /{pathname}

Thank you for replying so swiftly! The reason that I need the switch
--parents is to create
/{pathname}/b3/b4/b5 with all descendants. Without that switch, your syntax
will create
/{pathname}/b3 with all descendants.

Fergus  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]