Link to home
Start Free TrialLog in
Avatar of XK8ER
XK8ERFlag for United States of America

asked on

backup website linux

Hello,
I normally backup my website by doing this

tar czf html.tar.gz html

I would like to know if its possible to ignore files *.jpg and *.avi

I am using centos.
ASKER CERTIFIED SOLUTION
Avatar of santoshmotwani
santoshmotwani
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skullnobrains
skullnobrains

don't want points, here, but quote or escape the * if you want to be on the safe side

if your tar version does not have the --exclude option as in many versions of gnutar, you can use find to generate the file list for tar
Also if you have list of files to exclude , you can use -X option.
Ex.
tar czf html.tar.gz -X exclude.txt html

Open in new window