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
  •  


Cisco SG95-16 16-Port Gigabit Switch SG95-16-KR picture

Cisco SG95-16 16-Port Gigabit Switch SG95-16-KR

$47.00



Cisco SG95D 5 port Gigabit Desktop Switch SG95D-05-IN picture

Cisco SG95D 5 port Gigabit Desktop Switch SG95D-05-IN

$35.00



Cisco SG110 24 Port Gigabit Ethernet Switch w/ 2 x SFP SG110-24 picture

Cisco SG110 24 Port Gigabit Ethernet Switch w/ 2 x SFP SG110-24

$117.00



Cisco SG350-10MP-K9-NA Systems 10mp 10-port Gigabit Managed Switch picture

Cisco SG350-10MP-K9-NA Systems 10mp 10-port Gigabit Managed Switch

$248.00



New Linksys SE3005 5-port Gigabit Ethernet Switch picture

New Linksys SE3005 5-port Gigabit Ethernet Switch

$15.99



Linksys SE3008 8 Ports Rack Mountable Gigabit Ethernet Switch picture

Linksys SE3008 8 Ports Rack Mountable Gigabit Ethernet Switch

$18.99



*NETGEAR PROSAFE (JGS524V2) 24-Port Gigabit Ethernet Switch *NO AC* picture

*NETGEAR PROSAFE (JGS524V2) 24-Port Gigabit Ethernet Switch *NO AC*

$29.99



TP-Link TL-SF1005D 5-Port 10/100Mbps Fast Ethernet Desktop Switch picture

TP-Link TL-SF1005D 5-Port 10/100Mbps Fast Ethernet Desktop Switch

$12.99



YuanLey 10 Port Gigabit PoE Switch With 8 Poe Unmanaged with 2 1000Mbps Uplink picture

YuanLey 10 Port Gigabit PoE Switch With 8 Poe Unmanaged with 2 1000Mbps Uplink

$20.00



Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED picture

Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED

$89.97