티스토리 뷰

___리눅스

[명령어] unzip 명령어 | zip 명령어

변군 변군이글루 2020. 9. 4. 14:23

unzip 명령어

 

unzip 설치 여부 확인

$ yum info unzip
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
221 packages excluded due to repository priority protections
Installed Packages
Name        : unzip
Arch        : x86_64
Version     : 6.0
Release     : 20.amzn2
Size        : 377 k
Repo        : installed
Summary     : A utility for unpacking zip files
URL         : http://www.info-zip.org/UnZip.html
License     : BSD
Description : The unzip utility is used to list, test, or extract files from a zip
            : archive.  Zip archives are commonly found on MS-DOS systems.  The zip
            : utility, included in the zip package, creates zip archives.  Zip and
            : unzip are both compatible with archives created by PKWARE(R)'s PKZIP
            : for MS-DOS, but the programs' options and default behaviors do differ
            : in some respects.
            :
            : Install the unzip package if you need to list, test or extract files from
            : a zip archive.

$ yum install -y unzip

 

unzip 압축풀기

###현재 디렉토리에서 풀기
$ unzip bb.zip
Archive:  bb.zip
 extracting: dns1_201001.zip
 extracting: dns2_201001.zip
 extracting: dns3_201001.zip

$ ls
bb.zip  dns1_201001.zip  dns2_201001.zip  dns3_201001.zip

###하위 디렉토리에서 풀기
$ unzip bb.zip -d dns1
###dns1.zip : 압축파일
###dns1 : 디렉토리

 

zip 명령어

 

zip 압축하기

$ zip -9 sangchul sangchul.gz
댓글
댓글쓰기 폼