$ tar -zcvf backup.tar.gz --exclude-from=tarexclude.txt /home/oracle/tools
tarexclude.txt 文件的内容如下:
*.htm
*.HTM
*.html
*.HTML
*.doc
*.DOC
*.docx
*.DOCX
*.sep
*.SEP
*.gd
*.GD
*.gw
*.GW
*.xls
*.xlsx
*.ppt
*.PPT
*.pptx
*.PPTX
*.pdf
*.PDF
*.tif
*.TIF
*.gif
*.GIF
*.bmp
*.BMP
*.jpg
*.JPG
*.jpeg
*.JPEG
*.png
*.PNG
*.swf
*.SWF
*.avi
*.rar
*.tgz
*.gz
*.zip
*.avi
*.AVI
*.rmvb
*.flv
*.FLV
*.mpg
*.MPG
*.mpeg
*.wmv
*.WMV
*.exe
*.EXE
*.wav
*.WAV
*.tmp
*.txt
*.TXT