Bash command to Zip files in dir or sub dir with pattern full o incremental with retantion days to clean up dir.
- zip-files
- Table of Contents
- Prerequisites
- Install
- Usage
- Example
- Contributing
- Credits
- About Padosoft
- License
bash
This package can be installed easy.
cd /root/myscript
git clone https://github.com/padosoft/zip-files.git
cd zip-files
chmod +x zipfiles.sh
If you want to run programmatically, add it to cronjobs manually or execute install script:
cd /root/myscript/zipfiles
chmod +x install.sh
bash install.sh
bash zip-files.sh PATHTOZIP ZIPNAME ZIPNAMEPATH [MODE 0|1|2] [DAYCHANGES] [MAXRETENTIONDAYS]
bash /root/myscript/zip-files/zipfiles.sh /my/dir/images/ images.zip /my/dir/archives/
bash /root/myscript/zip-files/zipfiles.sh /my/dir/images/ images.zip /my/dir/archives/ 0 1
bash /root/myscript/zip-files/zipfiles.sh /my/dir/images/ images.zip /my/dir/archives/ 0 1 30
For help:
bash zipfiles.sh
Please see CONTRIBUTING and CONDUCT for details.
Padosoft is a software house based in Florence, Italy. Specialized in E-commerce and web sites.
The MIT License (MIT). Please see License File for more information.