I usually use something like the following to do it:<p>find $DIR -type f | rev | sort | rev | tar -cv -T &#x2F;dev&#x2F;stdin -f $OUTPUT.tar<p>Add a -j or -z or any other compressor you want.<p>This will sort the files on reverse filename order so that similar sounding files will go together. It&#x27;s not perfect and I had an idea to write something better but since it&#x27;s usually enough I didn&#x27;t really bother.<p>Only thing that is needed is a program that takes a list of files and sets them in order for tar to do the packing and gzip&#x2F;bzip2 compress the hell out of the pre-ordered files.