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:
In the safe location I then did the following:
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,
or
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.
UPDATE
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?
This is what I originally did:
Code:
tar -czf mydirectory.tar.gz directory
In the safe location I then did the following:
Code:
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,
Code:
.__quiz__
or
Code:
.__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.
UPDATE
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?