운영체제/Linux

파일 아카이브와 압축 명령

blackbearwow 2021. 2. 9. 16:18

tar아카이브 생성: cvf

tar cvf txt.tar any.txt

tar아카이브 풀기: xvf

tar xvf txt.tar

 

jar 아카이브 생성: 

jar cvf txt.jar any.txt

jar 아카이브 풀기: 

javr xvf txt.jar

 

.Z파일 압축

compress any.txt

.Z파일 압축 풀기

uncompress any.txt.Z

 

.gz파일 압축

gzip any.txt

.gz파일 압축 풀기

gunzip any.txt.gz

 

.tar.gz파일 압축

tar -zcvf any.txt.tar.gz any.txt

.tar.gz파일 압출 풀기

tar -zxvf any.txt.tar.gz

 

.zip파일 압축

zip any.txt.zip any.txt

.zip파일 압축 풀기

unzip any.txt.zip

 

.bz2파일 압축

bzip2 any.txt

.bz2파일 압축 풀기

bunzip2 any.txt.bz2

 

-현재 any.txt를 압축한다고 가정한다.