I have following file structure
.
├── doc1.pdf
├── doc2.pdf
└── images
├── img1.jpg
└── img2.jpg
I would like to tar images directory preserving parent images (without full path to it). What is more i would like skip other documents in directory (doc1, doc2) Currently I use:
tar -cf /sth_dir/images.tar -C /images/ . --exclude="doc*"
but i would like to not use --exclude because additional files, with different names might be added there.