250x250
Notice
Recent Posts
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
관리 메뉴

일상 코딩

[ubuntu / Linux] zip, unzip 본문

Linux

[ubuntu / Linux] zip, unzip

polarcompass 2021. 10. 26. 11:03
728x90

1. 설치

sudo apt-get install zip unzip

2.zip 방법

$ zip [압축파일 이름].zip [압축할 파일 or 디렉토리] [압축할 파일 or 디렉토리] ...

$ zip -r [압축파일 이름].zip [압축할 파일 or 디렉토리] ... # 디렉토리 압축

$ zip -j [압축파일 이름].zip [압축할 파일 or 디렉토리] ... # 디렉토리 이름 제외하고 압축

$ zip -u [압축파일 이름].zip [압축할 파일 or 디렉토리] ... # 변경되었거나 새로운 파일만 압축

3.unzip 방법

$ unzip [압축파일 이름].zip

$ unzip [압축파일 이름].zip -d [압축 푸는 위치] # 압축이 풀리는 위치를 특정할 수 있다.

$ unzip -d target_directory zip_file # 디렉토리에 압축을 푼다

$ unzip -j hope.zip # 현재 디렉토리만 추출

$ unzip -o -d target_directory zip_file # 프롬프트없이 모든 파일 덮어씀

$ unzip -n -d target_directory zip_file # 파일을 덮어 쓰지 마십시오.

 

 

출처.

https://changhoi.github.io/posts/linux/zip-command/

 

우분투 zip, unzip 하기

zip, unzip압축 하고 푸는 것을 도와주는 프로그램인데, 설치되어있지 않은 우분투에서는 아래 명령어로 설치할 수 있다.

changhoi.github.io

 

https://websetnet.net/ko/%EC%98%88%EC%A0%9C%EC%99%80-%ED%95%A8%EA%BB%98-unzip-%EB%AA%85%EB%A0%B9%EC%9D%84-%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC-Linux-%ED%84%B0%EB%AF%B8%EB%84%90%EC%97%90%EC%84%9C-%ED%8C%8C%EC%9D%BC%EC%9D%98-%EC%95%95%EC%B6%95%EC%9D%84-%ED%92%89%EB%8B%88-%EB%8B%A4/

 

728x90