File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : Use zip to compress all subdirectories under a folder and output each directory as a zip file.
3+ command : " for dir in $(ls -d {{directory}}*/); do (zip -r -q {{output}}$(basename $dir){{zip_name_endwith}}.zip $dir && echo -e \" Compressed to {{output}}$(basename $dir){{zip_name_endwith}}.zip.\" ); done"
4+ tags :
5+ - zip
6+ description : Use zip to compress all subdirectories under a folder and output each directory as a zip file.
7+ arguments :
8+ - name : directory
9+ description : The directory to execute.
10+ default_value : ./
11+ - name : output
12+ description : The output directory of the zip file. Optional, defaults to the current directory.
13+ default_value : ./
14+ - name : zip_name_endwith
15+ description : Endwith string of each zip file name Optional, the default time string.
16+ default_value : _$(date +%Y%m%d%H%M%S)
17+ source_url : " https://linuxhint.com/what-is-zip-file/"
18+ author : funnyzak
19+ author_url : " https://github.com/funnyzak"
20+ shells :
21+ - Bash
You can’t perform that action at this time.
0 commit comments