i have a directory structure with files like

/files/pics/gal1/1.jpg
/files/pics/gal1/thumbs/1.jpg
/files/pics/gal1/full/1.jpg

(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:

/files/pics*

but exclude

/files/pics/*/full/*

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

thank you

link|improve this question
feedback

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

This question came from our site for system administrators and desktop support professionals.

1 Answer

From the directory containing the files directory:

tar -zcf files.tgz files --exclude="files/pics/*/full"
link|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
feedback

Your Answer

 
or
required, but never shown