Scenario: Using Linux shell to back up a directory of many sub files and compressing the data with ‘tar -cvpJf filename.tar /savedir/’.
Goal: Using shell — checksum or validate the newly created ‘.tar’ against the original directory.
Limitations: Solution cannot involve downloading 3rd party support libraries. User cannot be part of the process.
Comments: Basically, I am wondering if there is a tar flag I am missing that will validate upon creation of the tar, or maybe I can pipe the tar into some process?
tararchive will be different from whatever you used to create it.taroption IOW.-Wor--verify(I don't know if this option is only available in GNU tar or POSIX tar, but since you use Linux, it should work).gtarto compare TAR archives against the filesystem are very limited. I recommend the older and more maturestarthat supports a-diffoption that allows to compare the content and any meta data and even more:starallows to control which meta data is to be compared by specifying a list with the optiondiffopts=