Score:0

Extract archive with tar but skip unchanged files

ru flag

I have a nightly process that unarchives a roughly 40 gigabytes large tar.gz file like this:

tar -xzf latest-backup.tar.gz

This step takes about 10 minutes, although often only a few files have changed inside the archive. I've seen that tar has some options to treat existing files, such as --skip-old-files:

--skip-old-files
    don't replace existing files when extracting, silently skip over them

Unfortunately, this also skips over files that changed and tar does not seem to support checking for file changes. Am I missing something, or is it really impossible to extract a large archive but only "apply the changes"?

in flag
Coincidentally, I think [this answer from yesterday](https://unix.stackexchange.com/a/704547/2823) also answers your question.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.