How to compress only specific multiple folders and files under linux?

A project, more than 100 folders and files, need to be compressed, but not all of them are compressed, only more than 70 folders and files are compressed. How to deal with them quickly?

I can think of a way to copy the folders and files that need to be packaged into a separate folder, and then tar.

I have never encountered this situation before. I would like to ask my friends about the solution.

May.22,2021

you can take advantage of tar's exclusion options, such as https://blog.csdn.net/catoop/.

.
Menu