Is there a way to create a .tar
file that omits the values of atime/ctime/mtime for its files/directories?
We have a st
We can create the tar file without timestamp appending to it.
1) Create tar file without compression and timestamp
tar -cf file_name.tar file_name
2) Create tar file with compression and without timestamp
tar -cf file_name | gzip -n > file_name.tar.gz
3) Alternate way
GZIP=-n tar -czf file_name.tar.gz file_name
Note: '-n' will not add timestamp and name
4) To extract tar file
tar -xf file_name.tar and tar -xzf file_name.tar.gz
To verify you can do like this
file file_name.tar or file_name.tar.gz
output = file_name.tar.gz: gzip compressed data, from Unix