Sample Header Ad - 728x90

tar: ./.tar.gz: file changed as we read it | "Flagged" files are unrelated to the file tar is supposed to operate on

0 votes
2 answers
239 views
I am trying to use tar to recursively compress all files with the .lammpstrj extension within the directory tree starting at the directory whose path is stored in the variable home. home contains the script containing my tar commands and 57 subdirectories, each containing a pair of sub-subdirectories named Soft_Pushoff and Equilibrium_NVT. Each Soft_Pushoff or Equilibrium_NVT directory contains one .lammpstrj file. The loop I am using to get this task done is: for index in $(seq 1 57) do cd $home/$index/Soft_Pushoff/ file=find ./ -mindepth 1 -maxdepth 1 -name "*.lammpstrj" -print tar cvf - ./$file | gzip -9 - > $file.tar.gz cd $home/$index/Equilibration_NVT/ file=find ./ -mindepth 1 -maxdepth 1 -name "*.lammpstrj" -print tar cvf - ./$file | gzip -9 - > $file.tar.gz done As it sweeps one of the 57 subdirectories of home, this section of the code usually prints: ././equilibration_nvt.lammpstrj ././soft_pushoff.lammpstrj to the terminal. However, in 3 different instances, this is what this section of the code prints out: ././equilibration_nvt.lammpstrj ././soft_pushoff.lammpstrj ./ ./time.txt ./soft_pushoff.restart.10000 ./equilibration_nvt.lmp ./.tar.gz tar: ./.tar.gz: file changed as we read it ./equilibration_nvt_pitzer.sh ./eps.txt ././soft_pushoff.lammpstrj ././equilibration_nvt.lammpstrj None of the files "flagged" by tar is supposed to be operated on by the tar commands I am using, so I am confused as to why they are listed alongside the warning message tar: ./.tar.gz: file changed as we read it? Also, none of these files is actually changing as tar is operating on the .lammpstrj files. What could explain this warning message and, most importantly, can I trust that none of the .lammpstrj.tar.gz files written by my tar commands is corrupt, especially the ones associated with this warning message? If this is relevant, my script is being run on a remote server. The .lammpstrj files I am trying to compress are up to 15.2 Gb in size. It takes about 2.5 days for my script to run on this remote server.
Asked by Felipe Evaristo (37 rep)
Jun 12, 2024, 04:35 PM
Last activity: Jun 14, 2024, 08:11 PM