Command to tar directory excluding certain files/folders

0 votes
Is there any shell command/script that supports excluding certain files/folders from being archived?
Jul 12 in Linux Administration by Upasana
• 8,530 points
32 views

1 answer to this question.

0 votes
$ tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz .

Try this!
answered Jul 12 by Shubham
• 13,300 points

Related Questions In Linux Administration

–1 vote
1 answer

How to use help command for ls?

The help command is limited and it ...READ MORE

answered Jan 3 in Linux Administration by Omkar
• 67,620 points
369 views
–1 vote
1 answer

How to use help command

The help command is limited and it ...READ MORE

answered Jan 10 in Linux Administration by Omkar
• 67,620 points
43 views
0 votes
1 answer

How to change permissions of folder and files in folder?

The chmod command is used to set/change the permissions ...READ MORE

answered Jan 31 in Linux Administration by Omkar
• 67,620 points
33 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Adding yes/no/cancel prompts in shell script

You can use the read command. Here's ...READ MORE

answered Mar 12 in Linux Administration by ajs3033
• 7,280 points
35 views
0 votes
1 answer

How to change the default shell in Linux?

1. Change the password file directly for ...READ MORE

answered May 24 in Linux Administration by Upasana
• 8,530 points
26 views
0 votes
1 answer
0 votes
1 answer

Removing a symlink to a directory

rm foo try this. Also, You need write ...READ MORE

answered May 15 in Linux Administration by Shubham
• 13,300 points
27 views