macOS용 반디집은 터미널에서 다음과 같은 커맨드 라인 파라미터를 이용해서 실행할 수 있습니다.
터미널에서 반디집의 실행 방법
1. open 명령어를 이용해서 app 파일을 실행
이 경우에는 파인더에서 실행하는 것처럼 하나의 앱만 실행되며, 다중으로 실행할 수 는 없습니다.
2. 실행 파일을 직접 실행
macOS용 앱은 Package라는 특수 형식의 폴더로 구성되어 있으며, 내부에 실제 실행 파일이 존재합니다.
반디집의 경우 실제 실행 파일의 위치는 아래와 같습니다.
/Applications/Bandizip.app/Contents/MacOS/Bandizip
뒤에 붙는 파라미터는 위와 동일한 형태로 사용이 가능합니다.
환경설정에서 지정된 기본 작동을 수행한다. 보통은 그냥 압축 파일을 연다.
a | Add files to archive |
x | Extract files with full paths |
t | Test integrity of archive |
d | Delete files from archive |
c | Create new archive (Overwrite existing one with the same name) |
cd | Display “New Archive” dialog box |
rn | Rename files in archive |
bc | Compress multiple files/folders with the name of each. If existing archives have the same name, (archive-name) (2), (archive-name) (3) … are created. If a destination folder is not specified, the archives are created in the folder where each of the original files exists. |
bx | Extract files from multiple archives to a destination folder. If a destination folder is not specified, the files are extracted to the folder where each of the archives exists. |
bt | Test integrity of each archive. |
- | Stop switch parsing |
-l:<0...9> | Set compression level (0: store, 1: fast, 5: default, 9: maximum) |
-r- | Disable recurse subdirectories (default) |
-r | Enable recurse subdirectories |
-aoa | Overwrite existing files without prompt |
-aos | Skip and not overwrite existing files |
-aou | Auto-rename extracted files For example, name.txt → name (2).txt |
-zopfli | Use Zopfil as default encoder (slow) |
-p:{password} | Set password for archive |
-o:{dir} | Specify destination folder Only with x command and batch commands (bc, bx, bt) |
-storeroot:<yes|no> |
-storeroot:yes Store root directory as top-level folder of archive
-storeroot:no Store no top-level folder of archive |
-y | Assume Yes on all queries Close (de)compression windows on task completion if no error occurs |
-ex:{list} |
Specify list of files to exclude when compressing -ex:hello.txt -ex:"*.bak" -ex:"*.bak;*.tmp" -ex:*\.git |
-root:{dir} | Specify root directory in archive when compressing (-root:top_folder) |
-fmt:{fmt} | Specify archive format (zip, zipx, exe, tar, tgz, lzh, iso, 7z, gz, xz) |
-v:{size} | Specify volume size (-v:1000000 -v:1440k -v:100MB ...) |
-cmt:{comment} | Set ZIP file comment (-cmt:Hello, -cmt:"Hello World!") |
-cmtfile:{filepath} | Specify path of txt file used as ZIP file comment (-cmtfile:mycomment.txt, -cmtfile:"c:\test\my comment.txt") |
-t:NN | Specify number of CPU threads used when compressing (-t:10, -t:1, -t:0) |
-cp:NN |
Specify code page used when opening or extracting files (Bandizip x -cp:932 japanese.zip) Examples of available code page - Chinese Simplified: 936 - Chinese Traditional: 950 - Japanese: 932 - Korean: 949 - UTF-8: 65001 |
-target:auto | Extract files to a destination folder using Extract Here (Smart) feature. If a destination folder is not specified, the files are extracted to the folder where each of the archives exists. |
-target:name | Extract files to an archive-name folder in a destination folder. If a destination folder is not specified, the files are extracted to the archive-name folder in the folder where each of the archives exists. |
아래 예제들은 실행 경로에 다음 경로가 추가되어 있어야 합니다.
/Applications/Bandizip.app/Contents/MacOS
터미널에서 실행할 때 샌드박스 제약을 가지고 있는 앱인 반디집은 ./sample.zip 같이 현재 폴더를 지정하면 인식하지 못합니다.
절대 경로나 현재 계정의 상대 폴더의 형태로 ~/Document/sample.zip 과 같이 지정을 해야 합니다.
Bandizip ~/Documents/sample.zip
Bandizip c ~/Documents/sample.zip ~/Documents/src1
Bandizip c ~/Documents/sample.zip ~/Documents/src1 ~/Documents/src2
Bandizip a ~/Documents/sample.zip ~/Documents/src/sample.txt
Bandizip a ~/Documents/sample.zip ~/Documents/src/sample1.txt ~/Documents/src/sample2.txt
Bandizip a ~/Documents/sample.zip ~/Documents/src/*.txt ~/Documents/src/*.jpg
Bandizip d ~/Documents/sample.zip sample.txt
Bandizip d ~/Documents/sample.zip *.txt
Bandizip x -o:~/Documents/dest ~/Documents/sample.zip
Bandizip a -y -p:Passw0rd ~/Documents/test.zip ~/Documents/src ~/Documents/src
Bandizip bx -o:~/Documents/dst a.zip b.zip c.zip
Bandizip bx -o:~/Documents/dst -target:auto a.zip b.zip c.zip
Bandizip bc a b c
Bandizip c -root:top ~/Documents/test.zip ~/Documents/abc.txt
Rename abc.txt to xyz.txt
Bandizip rn ~/Documents/test.zip abc.txt xyz.txt
Rename in subfolder abc.txt to xyz.txt
Bandizip rn ~/Documents/test.zip sub/abc.txt sub/xyz.txt
Rename AAA.txt to XXX.txt and BBB.txt to YYY.txt
Bandizip rn ~/Documents/test.zip AAA.txt XXX.txt BBB.txt YYY.txt
Use wildcards in filenames to extract files or to test archives
Bandizip x *.zip
Bandizip t ABC??.zip
Compress folders with the name of each, and create the archives in the destination folder
Bandizip bc -aoa -o:~/Documents/backup ~/folder1 ~/folder2 ~/folder3
~/folder1 → ~/Documents/backup/folder1.zip
~/folder2 → ~/Documents/backup/folder2.zip
~/folder3 → ~/Documents/backup/folder3.zip