How to zip files with a pattern in name into a single zip file

To zip files with a certain pattern in their name in a directory, we can combine find and zip command like below :

find <DIRECTORY_PATH> -name \*<PATTERN>\* | zip <ZIP_FILE_NAME>.zip -@ 

No comments:

Post a Comment