Find file and zip them

By combining the find and zip command, you can zip all files that match certain criteria.

For example, all PNG image files in the current folder and its subdirectories can be zip archived into a file using the command:

find . -name "*.png" -print | zip source -@ 

Here, the pattern must be quoted to keep the shell from expanding it.

2 Likes