If you tar
a directory recursively, it just uses the order from the os's readdir
.
But in some cases it's nice to tar the files sorted.
What's a good way to tar a directory sorted alphabetically?
Note, for the purpose of this question, gnu-tar on a typical Linux system is fine.
Best Answer
For a GNU
tar
:You'll probably also want to look at
--preserve-order
.