I want to create a tar file excluding certains folders who have many sub-folders and files, but leaving only the main folders that's being excluded. Explaining:
-project |-dir1 |-dir2 |-cache |-logs |-dir3 --dir4
I want my tar to exclude cache and logs content (files and folders) but mantain this empty folders in the tar file.
if I use --exclude=project/cache it excludes the folders from the file. How Can I do this ?