tar exclude directory
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
tar exclude directory
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
gzip folder with tar and exclude directories
# create a gzip archive of my-backup-folder
# but exclude all node_module directories
# flags:
# --exclude = exclude files, given as a PATTERN
# -c = create a new archive
# -z = filter the archive through gzip
# -f = use archive file or device ARCHIVE
#
# IMPORTANT NOTE:
# the exclude flag needs to come first to work
tar --exclude "node_modules" -czf backup.tar.gz /my-backup-folder
tar exclude directories from a File
tar -cvf backup.tar --exclude="log" --exclude="cache" public_heml/
tar exclude directory
tar -cvf backup.tar --exclude="public_html/template/cache" public_html/
tar exclude directories from a File
tar -cvf backup.tar -X exclude_directory.txt public_html/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us