Saori Yoshimoto work notes since 2018

Friday, August 20, 2021

[Linux-centOS] Useful command "ZIP", "UNZIP"

-ZIP compress :                     zip -r <compress file name>.zip <target name>

-ZIP compress + password:    zip -er <compress file name>.zip <target name>

------

◆unzip

unzip '*.zip'

◆If you have a large number of zip files to unzip, use "xargs"

find . -name '*.zip' | xargs -n1 unzip

◆"unzip" + "xargs" + Specify the output destination.

find . -name '*.zip' | xargs -n1 unzip -d <output directory name>

※The files hit by "find" command are passed to "xargs" command for unzipping. 

"xargs" will "unzip" every time it finds a file by specifying "-n1".

No comments:

Post a Comment