07-02-2013, 04:11 PM
I wanted to test some potential destructive code on a directory and all its subdirectories. So, I tarballed it and then made a copy from the tarball in a space where my code wouldn't accidentally obliterate anything that I really wanted to keep. My code seemed to work except that I noticed that certain files were not put into the tarball.
This is what I originally did:
tar -czf mydirectory.tar.gz directory
In the safe location I then did the following:
tar -xzf mydirectory.tar.gz
I ran a recursive diff on the archived and original directories. This showed that certain files where missing.
It seems that any file named .__<name>__ were not recorded in the archive. For example,
What is tar skipping over these files? How do I get tar to include them? What other files might tar not record?
Even if I ran tar in verbose mode, there was no message that things were being skipped over.
I installed "gnu's" version of "tar" and that works as expected. Everything is correctly archived.
So, why doesn't the natively installed "tar" do the right thing?