Zipping A Bunch of Files and Folders from STDOUT

Need to do a one time or scripted zip of a specific set of files? Here’s how i did it with my dated folder structure.

Folder structure example:

20091213
20091214
20091215

What I did to compress these folders:

find . -name "200912*" -print| zip -r 2009-12 -@

The find section can be adjusted to print out a specific path. My example grabs the December files in my current folder. The zip section just takes the STDOUT of the find section and recursively compresses the folders and contents into 2009-12.zip.

This entry was posted in Linux, Storage, Technology. Bookmark the permalink.

Leave a Reply