skip to Main Content

How to tar a directory and only include certain file types

How To Tar A Directory And Only Include Certain File Types
find myProjectDirectory -type f \( -name \*\.php -o -name \*\.js -o -name \*\.css -o -name \*\.inc \) | xargs tar -rf myProjectTarName.tar

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back To Top
×Close search
Search