views:

43

answers:

2

I don't know if this actually belongs here, maybe this question is more suitable to superuser. Well, last week I've wrote a small shell-script, where I used the tar command. As I read the man on the opengroup page about tar, I saw that it was marked as legacy, and that it is recommended to not use it any more. Does anyone knows why? And what command should I use instead?

+2  A: 

The answer is at the bottom of the page you mention: applications should migrate to use pax.

tar does not support files bigger than 8 gigabytes, while pax does, among other things, such as international character encoding, ACLs...

tonio
+3  A: 

AFAIK, practically no one uses pax, as recommended by the document, which is dated 1997, BTW. Besides, current versions of tar can handle more than 8 GB, and my version of tar, at least, can hold Й.txt, so the 7-bit ascii filename limit is obviously gone with the wind.

Marcelo Cantos
Well, this is true for gnu tar, but not much when you have to work with versions of older unices you cannot upgrade (and yes, unfortunately, this append in real life, at least temporarily).
tonio
@tonio: That's a motherhood statement.
Marcelo Cantos
I totally agree that in most cases, `tar` is as good: recent tar versions, do the job, handle all cases, and are well deployed. And actually, that is what I do use. But it happened a few times that no recent tar was available, and that caused problems. At those times, I was glad to know `pax` was here.
tonio
@tonio: "Motherhood statement" is not an expression of disagreement.
Marcelo Cantos