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
  •  


ALLEN BRADLEY 281G-F12S-10B-RRG-CBG /C  AMORSTART MODULE 280G-FS-10-RG STK 2911 picture

ALLEN BRADLEY 281G-F12S-10B-RRG-CBG /C AMORSTART MODULE 280G-FS-10-RG STK 2911

$332.50



AMD Ryzen 9 5950X 16-core 32-thread Desktop Processor picture

AMD Ryzen 9 5950X 16-core 32-thread Desktop Processor

$319.99



Intel Core i5-8500 Six Core Desktop PC CPU Processor 3.00GHz LGA1151 SR3XE picture

Intel Core i5-8500 Six Core Desktop PC CPU Processor 3.00GHz LGA1151 SR3XE

$49.99



Intel Core i9-12900KF - 12th Gen Alder Lake 16-Core (8P+8E) 3.2GHz LGA CPU picture

Intel Core i9-12900KF - 12th Gen Alder Lake 16-Core (8P+8E) 3.2GHz LGA CPU

$262.99



(1) Intel Core i7-4790 3.60GHz - SR1QF - Processor - CPU picture

(1) Intel Core i7-4790 3.60GHz - SR1QF - Processor - CPU

$33.00



Intel Core i7-4790 3.60GHz Quad Core CPU Processor SR1QF LGA 1150 Socket picture

Intel Core i7-4790 3.60GHz Quad Core CPU Processor SR1QF LGA 1150 Socket

$32.99



Intel Core i7-14700KF Unlocked Desktop Processor picture

Intel Core i7-14700KF Unlocked Desktop Processor

$420.22



AMD Ryzen 9 7900X3D Gaming Processor - 12 Core And 24 Threads - 5.60 GHz Max Boo picture

AMD Ryzen 9 7900X3D Gaming Processor - 12 Core And 24 Threads - 5.60 GHz Max Boo

$329.99



Intel Core i7-7700 3.60GHz Quad-Core CPU picture

Intel Core i7-7700 3.60GHz Quad-Core CPU

$41.66



Intel Core i5-8500 3.00GHz SR3XE Socket 1151 6 Core CPU Processor picture

Intel Core i5-8500 3.00GHz SR3XE Socket 1151 6 Core CPU Processor

$55.00