Find the answer to your Linux question:
Results 1 to 2 of 2
I want to find out if you can use tar cf - to copy only the differences. Let me explain a little bit. I am copying a few folders from ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18

    tar cf command - copy the differences only


    I want to find out if you can use tar cf - to copy only the differences.

    Let me explain a little bit. I am copying a few folders from one disk to another disk mount. The initial tar cf - * would copy everything over.

    Let's say after a few days the content of on the original disk has changed and I want to only tar (copy) the differences.

    How do I do this?

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18

    tar cf --newer YYYYMMDD

    To copy differences or only the files since the last tar date here is the command.

    Let's say we did a tar on Feb 9th, 2009 as follows:
    (cd /mydata; tar cf - *) | tar xvf -

    Today is Feb 11th and we only want to copy the files that have changed since Feb 9th, 2009. The command would be
    (cd /mydata; tar cf - --newer 20090209 * ) | tar xvf -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •