
有一個 tar 檔案是幾天前創建的,該 tar 檔案是在 /files 目錄中建立的。
現在 /files 目錄中有新檔案上傳到其中。
我的問題是如何僅使用上傳的新檔案建立另一個檔案。
謝謝..
答案1
在我看來你想做一個增量備份(另請查看微分,看看這是否是您想要的)。這是關於如何做到的很好的教程使用 tar 進行增量備份。
如果你只想要一個差異,那麼使用開關-d
(至少對於 GNU tar):
-d, --diff, --compare
find differences between archive and file system
例如tar -df foo.tar *