logoalt Hacker News

krn1p4n1c • yesterday at 12:39 PM • 2 replies • view on HN

tar cf - . | tar xf - -C <dest>


Replies

jhallenworld • today at 9:41 PM

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.
Rygian • yesterday at 12:45 PM

with a sandwiched `| pv |` for fun stats

➕ show 1 reply