The -d flag compares files inside an archive with those on the filesystem. This feature can be used to determine whether or not a new archive needs to be created.
$ tar -df archive.tar
afile: Mod time differs
afile: Size differs
Linux Shell Scripting Cookbook - Third Edition
by Shantanu Tushar
Published by
Packt Publishing, 2017
The -d flag compares files inside an archive with those on the filesystem. This feature can be used to determine whether or not a new archive needs to be created.
$ tar -df archive.tar
afile: Mod time differs
afile: Size differs