difference in size of the tarred files after archiving using tar command
i am using red hat linux 2.4 . I have 3 folders dir1 dir2 dir3
I have tarred them like this. 1.tar cvfz tarball_1.tgz dir1 dir2 dir3 2.tar cvfz tarball_2.tgz dir1 dir2 dir3 2>& /dev/null (So that it does not display any error message or operation details to the user) [usr@machine]$ ls -lrt -rw-r--r-- 1 usr grp 199843988 May 17 13:39 tarball_1.tgz -rw-r--r-- 1 usr grp 199837488 May 17 13:53 tarball_2.tgz But can any one explain the size difference as seen in list output... |
did u mean
Quote:
Quote:
Quote:
|
The same for me. Apparently there is no reason why they should differ, unless their actual content is different. What is the output of the following?
Code:
diff <(tar tvf tarball_1.tgz) <(tar tvf tarball_2.tgz) |
Quote:
Hi, The second command is "tar cvfz tarball_2.tgz dir1 dir2 dir3 2>& /dev/null" only. I have used this to redirect stdout and stderr so that the ouput as well as the error message(if any) will not be displayed to the user. Its a part of error handling in my script. I dont understand why you are getting the error while issuing the same... Pls do reply. |
I am actually getting a diff in both files buy doing cmp of both the files created buy just a simple tar withoput redirting. I am assuming the diff is in the info of timestamps of the stored files
@emagnun I don't know why I m getting that error, but i was able to solve it by putting the "&" before the ">" symbol |
All times are GMT -5. The time now is 11:53 PM. |