Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report