Results 1 to 2 of 2

Thread: Command-line syntax : a question about cp --parents

  1. #1
    Member registered user
    Join Date
    Dec 2006
    Posts
    49

    Command-line syntax : a question about cp --parents

    I cannot find (and don't know whether there is) a Forum specific to command-line syntax questions, so I'll post it here. Please put me right if I want to go elsewhere (and I apologise for wasting your time). Here is the question. Thank you!

    I can use
    cp -vr --parents /a/b/c/d /x/y
    to create a directory /x/y/a/b/c/d containing everything at d and everything under d.

    But how could I create a directory x/y/b/c/d (ie omitting a)? I could MOVE to /a/ and then use
    cp -vr --parents b/c/d /x/y
    but I really don't want to do the MOVE (and can think of circumstances where I might not be able to).

    I'm really looking for something exactly similar to the
    tar -C DIRNAME
    switch that allows one to make a virtual move to the directory DIRNAME before commencing the tar operation.

    Thank you!

    Fergus

    PS Again, sorry - if there is a Forum under Knoppix.NET (or for that matter elsewhere) specific to questions about command-line syntax, please point me to it ...

  2. #2
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    This is not Knoppix-specific at all? What about trying sites like linuxquestions.org?
    Tip: Check out rsync whenever you feel you approach the capabilities of cp.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



Samsung 16GB 2Rx4 PC4-2133P DDR4-17000 1.2V RDIMM ECC Registered Server Memory picture

Samsung 16GB 2Rx4 PC4-2133P DDR4-17000 1.2V RDIMM ECC Registered Server Memory

$16.29



Samsung 16GB (2x8GB) DDR4 2400MHz PC4-19200 Desktop RAM Memory M378A1K43CB2-CRC picture

Samsung 16GB (2x8GB) DDR4 2400MHz PC4-19200 Desktop RAM Memory M378A1K43CB2-CRC

$19.95



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$12.90



A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture

A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G

$13.99



Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM picture

Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM

$13.25



Corsair Vengeance LPX 32GB PC4-25600 (DDR4-3200) Memory NEVER USED LOOSE STICKS picture

Corsair Vengeance LPX 32GB PC4-25600 (DDR4-3200) Memory NEVER USED LOOSE STICKS

$40.00



TeamGroup 16GB PC4 2666 PC4 21300 DDR4 2666MHz 1.2V CL19 Desktop RAM Memory picture

TeamGroup 16GB PC4 2666 PC4 21300 DDR4 2666MHz 1.2V CL19 Desktop RAM Memory

$27.95



A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM picture

A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM

$287.96



A-Tech 64GB 4x 16GB 2Rx4 PC4-17000R DDR4 2133MHz ECC REG RDIMM Server Memory RAM picture

A-Tech 64GB 4x 16GB 2Rx4 PC4-17000R DDR4 2133MHz ECC REG RDIMM Server Memory RAM

$87.96