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/.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e8c0-2c44d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e8c0-2c44d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?