Quantcast
Channel: EasyOraDBA
Viewing all articles
Browse latest Browse all 263

Linux exclude certain files formats eg : *.gz *.zip from a tar archive

$
0
0

If you want to exclude certain filetypes from the directory when creating a tar archive use the –exclude parameter for tar

tar -zcvf filename.tar.gz abc_direc/ –exclude=’*.zip’ –exclude=’*.gz’ –exclude=’*.log’ –exclude=’*.pdf’

tar -zcvf wha_clean.tar.gz public_html/ –exclude=’*.zip’ –exclude=’*.gz’ –exclude=’*.log’ –exclude=’*.pdf’ –exclude=’*.jpg’ –exclude=’*.JPG’ –exclude=’error_log’ –exclude=’*.tar’

The post Linux exclude certain files formats eg : *.gz *.zip from a tar archive appeared first on EasyOraDBA.


Viewing all articles
Browse latest Browse all 263

Trending Articles