Answer the question
In order to leave comments, you need to log in
How to exclude empty folders from tar archive
Perhaps the question is simple, but when I googled, I found more questions “how to include empty folders in the archive” than how to exclude empty folders.
The goal is a simple backup of folders on the server according to the principle “back up everything that is newer than the date of the previous modification of the log file”. Tar is launched with the -zcvf options + forced exclusion of some files and folders according to patterns. The folders are fairly static, so now I get 40-100kb archives containing only empty folders. If an easy way to exclude them?
Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question