Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

difference in size of the tarred files after archiving using tar command

9 views
Skip to first unread message

Sooraj S

unread,
May 17, 2011, 5:59:23 AM5/17/11
to
Hi,

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...

Jan Gerrit Kootstra

unread,
May 17, 2011, 2:18:12 PM5/17/11
to
Op 17-05-11 11:59, Sooraj S schreef:

Sooraj,


I do not know what happend to the directories in the 14 minutes between
the two tar actions.


Please try to create tarballs with one commandline, so changes by a
process or a user are less likely.


tar cvfz tarball_1.tgz dir1 dir2 dir3 ; \
tar cvfz tarball_2.tgz dir1 dir2 dir3 2> /dev/null

Be aware that you made a type error 2>& should either be 2> or 2>&1>

Kind regards,


Jan Gerrit Kootstra

Jan Gerrit Kootstra

unread,
May 17, 2011, 3:27:52 PM5/17/11
to
Op 17-05-11 11:59, Sooraj S schreef:
Sooraj,


I do not know what happend to the directories in the 14 minutes between
the two tar actions.


Please try to create tarballs with one commandline, so changes by a
process or a user are less likely.


tar cvfz tarball_1.tgz dir1 dir2 dir3 ; \
tar cvfz tarball_2.tgz dir1 dir2 dir3 2> /dev/null

Be aware that you made a type error 2>& should either be 2> or 2>&1>

I tried something similar and got the exact same size.

So I suppect that one of the directories (folders as you call them) must
have changed.

0 new messages