Question: I want to create a tar file where all of the directories and files are processed in alphabetical order. This is for the entire directory hierarchy that's being tarred up, so it would start by processing the first directory alphabetically, and then sub-directories in there alphabetically, etc. I looked through the man page and can't find a switch for this.

I will admit, this is half novelty, half slight optimization. I just can't believe that there isn't an easy way to do this. I must be missing something.

Answer: 
Assuming you don't have any files with newlines in the names:

```
find /source_directory -print | sort | tar -czf target.tgz -T -

```

If that doesn't work (never tried it, so I don't know of - means stdin for the -T argument):

```
find /source_directory -print | sort > /tmp/temporary_file_list
tar -czf target.tgz -T /tmp/temporary_file_list

```

Then there is the question of why. But sometimes it is easier not to ask.
As an alternative to @CharlieHerron's answer, if you are only interested in preserving content (files, symlink) and folder meta-data (e.g, folder permission, mtime, etc.), you may want to filter folders out of `find`'s output. 

```
find paths -not -type d -print 0 | sort -z | tar cf tarfile.tar --null -T -

```