‹ BackHN Continuity

Thread

cp: -r or -R?

126 points · 110 comments · zdw

  1. krn1p4n1c · · focus · HN ↗
    tar cf - . | tar xf - -C <dest>
    1. jhallenworld · · focus · HN ↗
      I never bothered to learn -C, instead I use:

          tar -cf - . | (cd <dest>;  tar -xf -)
      
      For doing something like duplicating root of a filesystem you may want --one-file-system.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.