Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I never understood why so few people use `pax` instead of `tar`. It has always seemed more user friendly to begin with.

With pax, the `-k` option will not overwrite existing files. Also not using `-p o` or `-p e` will not preserve rights. I don't know why you would extract and preserve rights to extract binaries in a chroot, usually you would want to control the permissions instead.



The main reason is probably that tar is installed by default on 99% of Linux systems you might come across, while pax isn't...


Now that is funny, a few days ago I was downvoted to oblivion for stating the obvious: that nobody cares about POSIX anymore. And now you are telling me that all those downvoters are probably not following POSIX systems[1], either on their own desktop or their servers.

[1] pax is the recommended archive utility in the POSIX shell&utilities section while tar and cpio aren't mentionned.


Because tar is super versatile, old, and as the name implies, creates an archive. Useful for creating an archive to image something, and many times you want reproducible ownership and permissions.

Tar can do all the same things, it just requires options either on the archiving or extraction end.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: