how use tar and extract everything except certain files? [closed] how use tar and extract everything except certain files? [closed] bash bash

how use tar and extract everything except certain files? [closed]


Try using the following command

tar -xvzf /path/to/tarfile --exclude='file dont want to extract'


You can use, as commented by Gryphius, the --exclude option to GNU tar.

You could also post-process the tar archive with tardy.

tardy enables you to do other useful transformations (e.g. prefixing the archived file paths, changing user or group name, etc...).