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
  •  


Knoppix NSM 1.2 picture

Knoppix NSM 1.2

$8.50



Hamshack Live DVD-ROM picture

Hamshack Live DVD-ROM

$6.80



Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive picture

Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive

$9.99



Linux Knoppix 4.0.2 Installation Disc picture

Linux Knoppix 4.0.2 Installation Disc

$39.99



KNOPPIX 9.1 LINUX INSTALL & LIVE DVD picture

KNOPPIX 9.1 LINUX INSTALL & LIVE DVD

$9.99



Knoppix Linux Bootable OS v8.6

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 32G USB Stick

$20.30



Acer Aspire One 9 inch Netbook ZG5 512MB RAM 8GB SSD HD Knoppix Linux WiFi VGA picture

Acer Aspire One 9 inch Netbook ZG5 512MB RAM 8GB SSD HD Knoppix Linux WiFi VGA

$79.99



Knoppix Linux Bootable OS v8.6

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 16G USB Stick

$19.95