HomeAppleArchive Utility doesn't extract all recordsdata from tar archive

Archive Utility doesn’t extract all recordsdata from tar archive


Archive Utility vs BSD tar behaviour:

echo -n 'Howdy' >hi there.txt  # "Howdy" in hi there.txt
tar cvf hi there.tar hi there.txt # hi there.tar incorporates "hi there.txt" file with "hi there" textual content
echo ' world!' >>hi there.txt  # "Howdy world!" in hi there.txt
tar rf hi there.tar hi there.txt  # hi there.tar incorporates 2 variations of "hi there.txt" file a primary with "Howdy" textual content and second with "Howdy world!n" textual content
tar tvf hi there.tar           # to substantiate!
rm hi there.txt                # hi there.txt removing
tar xvf hi there.tar           # tar extracts the 2 hi there.txt recordsdata, i.e. the primary then the second overwriting the primary
cat hi there.txt               # "Howdy world!" anticipated

One-liner:

echo -n 'hi there' >hi there.txt; tar cvf hi there.tar hi there.txt; echo ' world!' >>hi there.txt; tar rf hi there.tar hi there.txt; tar tvf hi there.tar; rm hi there.txt ; tar xvf hi there.tar; cat hi there.txt

Similar behaviour with each BSD tar and GNU tar

As “tar” stands for Tape ARchiver … it’s traditionally significant to supply the choice to bodily append a corrected file to the archive on recorded on the tape with out requiring to utterly erase the tape first …

Query: Now attempt to extract hi there.tar with MacOS “Archive Utility” and you’ve got solely hi there.txt with “Howdy” … why!?

So to my standpoint, “Archive Utility” doesn’t extract all recordsdata …

-/-

Bonus query: And if “hi there.txt” already exists within the folder, “Archive Utility” will extract the primary file as “hi there 2.txt” with out even requesting which motion the consumer needs (i.e. a rename or an overwrite) … why!?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments