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
    50

    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
  •  


Dell SonicWall TZ400 Network Security Appliance Firewall New picture

Dell SonicWall TZ400 Network Security Appliance Firewall New

$185.00



Ubuntu Server 26.04.1 LTS Bootable USB Flash Drive – Latest September 2026 picture

Ubuntu Server 26.04.1 LTS Bootable USB Flash Drive – Latest September 2026

$13.99



OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN

$115.00



Start9 Server Pure 32GB 4TB Intel i7 Node StartOS — Box + PSU picture

Start9 Server Pure 32GB 4TB Intel i7 Node StartOS — Box + PSU

$649.00



Microsoft SQL Server 2025 Standard 32 Core Unlimited CAL Retail License Package picture

Microsoft SQL Server 2025 Standard 32 Core Unlimited CAL Retail License Package

$299.00



All New Ubuntu 26.04 LTS Linux Bootable USB Flash Drive picture

All New Ubuntu 26.04 LTS Linux Bootable USB Flash Drive

$15.95



NVIDIA Jetson TK1 + Intel NUC Compute Cluster Tray w/ Netgear 16-Port Switch picture

NVIDIA Jetson TK1 + Intel NUC Compute Cluster Tray w/ Netgear 16-Port Switch

$499.99



BOSGAME E4 Air Mini PC, AMD Ryzen 5 3500U 8GB DDR4 256GB SATA SSD picture

BOSGAME E4 Air Mini PC, AMD Ryzen 5 3500U 8GB DDR4 256GB SATA SSD

$169.99



Multi-Boot Linux & Utility 18 in 1 USB – Best of 2026 Free Same-Day Shipping picture

Multi-Boot Linux & Utility 18 in 1 USB – Best of 2026 Free Same-Day Shipping

$22.99



SQL Server 2022 Enterprise 96 Core License & DVD Unlimited CALs with CoA picture

SQL Server 2022 Enterprise 96 Core License & DVD Unlimited CALs with CoA

$284.99