You can have multiple exclude options for tar so
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .
etc will work. Make sure to put --exclude
before the source and destination items.
Related Posts:
- gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How to perform grep operation on all files in a directory?
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- How to substitute shell variables in complex text files
- How can I recursively find all files in current and subfolders based on wildcard matching?
- Curl command for https ( SSL )
- How to exclude a directory in find . command
- “sed” command in bash
- How to exclude a directory in find . command
- Pseudo-terminal will not be allocated because stdin is not a terminal
- tar removing leading ‘/’ from member names
- Opening a .tar.gz file with a single command
- Given two directory trees, how can I find out which files differ by content?
- Diff command along with Grep gives “Binary file (standard input) matches”
- Pseudo-terminal will not be allocated because stdin is not a terminal
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- ./configure : /bin/sh^M : bad interpreter
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- Is there a “goto” statement in bash?
- tar: Cowardly refusing to create an empty archive
- Implementing shell in C and need help handling input/output redirection
- Command to change the default home directory of a user
- Writing a simple shell in C using fork/execvp
- Implementation of multiple pipes in C
- chmod: changing permissions of ‘my_script.sh’: Operation not permitted
- What does “&” at the end of a linux command mean?
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- What does set -e mean in a bash script?
- Syntax error near unexpected token ‘then’
- How to use sed to extract substring
- what does -zxvf mean in tar -zxvf filename?
- tar: Error is not recoverable: exiting now
- How do I know the script file name in a Bash script?
- Shell command to monitor changes in a file
- What is “-bash: !”: event not found”
- What does ‘set -e’ do, and why might it be considered dangerous?
- tar – Remove leading directory components on extraction
- How to add a timestamp to bash script log?
- Colors in bash after piping through less?
- How can I kill all stopped jobs?
- How to run command as user who has /usr/sbin/nologin as Shell?
- Is there a way to do a remote “ls” much like “scp” does a remote copy?
- Transfer 15TB of tiny files
- How do I join two named pipes into single input stream in linux
- Amazon Linux: apt-get: command not found
- How do I find all files containing specific text on Linux?
- Where can I find php.ini?
- Linux: ‘Username’ is not in the sudoers file. This incident will be reported
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- How can I exclude directories from grep -R?
- QEMU: /bin/sh: can’t access tty; job control turned off
- Meaning of exit status 1 returned by linux command
- How can I kill a process by name instead of PID, on Linux?
- Extract file basename without path and extension in bash
- How to change permissions for a folder and its subfolders/files in one step
- mysql_config not found when installing mysqldb python interface
- linux command to get size of files and directories present in a particular folder?
- Compile the Fortran program in Windows using gfortran
- How can I set the ‘backend’ in matplotlib in Python?
- Yum fails with – There are no enabled repos.
- Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
- configure: error: cannot run C compiled programs
- “find: paths must precede expression:” How do I specify a recursive search that also finds files in the current directory?
- Difference between exec, execvp, execl, execv?
- Restarting cron after changing crontab file?
- cd into directory without having permission
- WordPress cloning issue
- What permissions should my website files/folders have on a Linux webserver?
- Why is my crontab not working, and how can I troubleshoot it?
- Can I automatically add a new host to known_hosts?
- Why is “chmod -R 777 /” destructive?
- How can I run Debian stable but install some packages from testing?
- Environment variables of a running process on Unix?
- How to check if a library is installed?
- Meaning of the buffers/cache line in the output of free
- Is it normal to get hundreds of break-in attempts per day?
- How to cd into a directory with this name “-2” (starting with the hyphen)?
- how to disable SSH login with password for some users?
- How do I prevent accidental rm -rf /*?
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- What does Virtual memory size in top mean?
- What’s the best way to check if a volume is mounted in a Bash script?
- How do I find the UUID of a filesystem
- Find out symbolic link target via command line
- Meaning of directories on Unix and Unix like systems
- How to handle security updates within Docker containers?
- How can I port forward with iptables?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- Is it possible to make Nginx listen to different ports?
- REJECT vs DROP when using iptables
- Linux command line best practices and tips?
- How to make Windows 7 USB flash install media from Linux?
- How to get pid of just started process
- How to install/change locale on Debian?
- What limits the maximum number of connections on a Linux server?
- How to do the port forwarding from one ip to another ip in same network?
- Linux – Is there a way to prevent/protect a file from being deleted even by root?
- How to remove invalid characters from filenames?