How to tar directory excluding certain files and folders in Linux?

You can use Linux tar command with –exclude option to archive a directory excluding certain files and folders.

Example:

Create some files and directories:

Ter directory excluding some files or folders:

Leave a Reply