Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of Tar Time Stamp in the Future when the Linux tar command appears

Shulou Source: shulou.com Published: 2022-06-01 12:12:56 10月02日 Update

This article introduces the relevant knowledge of "how to solve the Tar Time Stamp in the Future of Linux tar commands". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Recently encountered such a problem, I just created a file on my Mac machine to tar package to generate a file scripts.tar.bz2, and then in a Centos to get the file, decompress, and then there are the following problems time stamp in the future.

The code is as follows:

$tar xvjf scripts.tar.bz2

Temp

Tar: temp: time stamp 2014-07-17 13:34:02 is 2459.292801106 s in the future

Reason

The time of the two machines is not the same, so the machine for creating and compressing files (in this case, Mac) takes more time than the decompression machine (Centos).

an antidote against the disease

Adjust the time of the two machines to be the same.

Add the m parameter, such as the time on the decompression machine used by tar xvjfm scripts.tar.bz2.-m,-touch don't extract file modified time

This is the end of the content of "how to solve the problem of Tar Time Stamp in the Future when Linux tar command appears". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Machines files time commands consistency content more knowledge problems practicality the right medicine learning and then code reasons parameters dilemmas facts situations articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Linux Shulou Information Docker NVidia