Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following directory structure


I use this command to create an archive of all the directories starting with the letters a-m

tar czf --exclude=books/AI.and.algorithms --exclude=books/[N-Z]* --exclude=books/[n-z]* books

The .tgz archive that gets created does not contain the java.swing/ directory.

Am I missing something in my use of tar or is this a bug in cygwin?

share|improve this question

migrated from Nov 5 '12 at 16:34

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

The issue was that the java.swing/ directory is empty. Apparently cygwin tar silently omits empty directories. There is nothing in the --help about empty directories either.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.