Take the 2-minute tour ×

i have a directory structure with files like


(with 1000's of files. gal1 and 1.jpg obviously change)

all i want to back up are everything apart from the ones in /full/. so basically, i need to backup:


but exclude


how can i write a .tar.gz to do this?

thank you

share|improve this question

migrated from serverfault.com Jul 10 '10 at 0:08

This question came from our site for system and network administrators.

1 Answer 1

From the directory containing the files directory:

tar -zcf files.tgz files --exclude="files/pics/*/full"
share|improve this answer
Maybe: tar -zcf files.tgz files/pic/gal1 --exclude="files/pics/*/full" to match OP's requirement –  jim mcnamara Jul 12 '10 at 16:42

Your Answer

