Moving to Freedom, .Org

tar up directories only

To create a tar file containing only a dir structure in GNU/Linux, this seems to work nicely:

tar -cvf filename.tar --after-date YYMMDD *

Where YYMMDD is a date newer than all files in the dir(s) being tarred up. Picking a date in the future should do the job. Tar will include all the directories and none of the files.

(That same behavior is the reason I went to the trouble of creating the cpafter script to copy files created after a certain date — I didn’t want all those empty dirs included.)