강좌
클라우드/리눅스에 관한 강좌입니다.
프로그램 분류

7zip

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문











7zip







ㅇ 제작 : 리눅스포털(www.superuser.co.kr) 수퍼유저코리아 서버


SULINUX 홈페이지 : www.sulinux.net


ㅇ 리눅스포털 홈페이지 : www.superuser.co.kr




















:: 빠르고 강력한 압축 유틸 7zip ::

20070602_RV_7zip_html_7eabd65d.gif

프로그램명 : 7zip_4.47_x86 for Linux

운영체제 : Linux/Win98/Me/NT/2000/Xp/Vista

라이센스 : LPGL

홈페이지 : http://www.7-zip.org/

테스트 환경 : 페도라 코어6

출처 : 리눅스포털(www.superuser.co.kr) 수퍼유저코리아


7-zip



1. 소개

7-Zip은 오픈 소스로 배포되고 있는 압축 소프트웨어으로, 윈도 XP 64비트를 지원한 최초의 압축 프로그램이기도 하다. 윈도판으로는 7-Zip의 이름으로, 그외의 플랫폼에서는 p7-zip/EZ 7z(Mac OS X에서만)의 이름으로 배포되고 있다.


윈도XP에서는 GUI방식으로 제공되며, Linux에서는 Command방식의 TUI형태로 제공된다.


사용되고 있는 알고리즘은 LZMA로 높은 압축효율과 빠른 압축풀기가 가능하다


참고로 LZMA에 대한 자세한 내용은 패키지를 다운 받은 후 tar를 풀면

p7zip_4.XX/DOCS/lzma.txt에 전문이 있으므로 참고하길 바란다.


2. Download

http://sourceforge.net/project/downloading.php?group_id=111810&use_mirror=nchc&filename=p7zip_4.47_x86_linux_bin.tar.bz2&91468330 사이트에서 리눅스용


p7zip_4.47_x86_linux_bin.tar.bz2을 다운 받는다.


[root@fc6 ~]# wget

http://downloads.sourceforge.net/p7zip/p7zip_4.47_x86_linux_bin.tar.bz2?modtime=1180299135&big_mirror=0

[1] 13656

[root@fc6 ~]# --17:46:46--

http://downloads.sourceforge.net/p7zip/p7zip_4.47_x86_linux_bin.tar.bz2?modtime=1180299135

Resolving downloads.sourceforge.net... 66.35.250.203

Connecting to downloads.sourceforge.net|66.35.250.203|:80... connected.

HTTP request sent, awaiting response... 302 Found

Location:

http://nchc.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.47_x86_linux_bin.tar.bz2 [following]

--17:46:46--

http://nchc.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.47_x86_linux_bin.tar.bz2

Resolving nchc.dl.sourceforge.net... 211.79.61.10, 2001:e10:5c00:1::10

Connecting to nchc.dl.sourceforge.net|211.79.61.10|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 1818757 (1.7M) [application/x-tar]

Saving to: `p7zip_4.47_x86_linux_bin.tar.bz2'


100%[=====================================================>] 1,818,757 167K/s in 12s


17:46:59 (151 KB/s) - `p7zip_4.47_x86_linux_bin.tar.bz2' saved [1818757/1818757]


[root@fc6 ~]# ls -lh p7zip_4.47_x86_linux_bin.tar.bz2

-rw-r--r-- 1 root root 1.8M 528 05:50 p7zip_4.47_x86_linux_bin.tar.bz2


3. 압축풀기

[root@fc6 ~]# tar xvfj p7zip_4.47_x86_linux_bin.tar.bz2

p7zip_4.47/bin/

p7zip_4.47/bin/7za

p7zip_4.47/bin/7zCon.sfx

p7zip_4.47/bin/Codecs/

p7zip_4.47/bin/Codecs/Rar29.so

p7zip_4.47/bin/7z

p7zip_4.47/bin/7z.so

p7zip_4.47/bin/7zr

p7zip_4.47/contrib/

--중략--

p7zip_4.47/man1/7z.1

p7zip_4.47/man1/7za.1

p7zip_4.47/install.sh

p7zip_4.47/ChangeLog

p7zip_4.47/DOCS/

p7zip_4.47/DOCS/7zFormat.txt

p7zip_4.47/DOCS/readme.txt

p7zip_4.47/DOCS/copying.txt

p7zip_4.47/DOCS/unRarLicense.txt

p7zip_4.47/DOCS/Methods.txt

p7zip_4.47/DOCS/License.txt

p7zip_4.47/DOCS/history.txt

p7zip_4.47/DOCS/lzma.txt

p7zip_4.47/DOCS/7zC.txt

p7zip_4.47/DOCS/MANUAL/

p7zip_4.47/DOCS/MANUAL/syntax.htm

p7zip_4.47/DOCS/MANUAL/index.htm

p7zip_4.47/DOCS/MANUAL/style.css

p7zip_4.47/DOCS/MANUAL/exit_codes.htm

p7zip_4.47/DOCS/MANUAL/commands/

p7zip_4.47/DOCS/MANUAL/commands/delete.htm

p7zip_4.47/DOCS/MANUAL/commands/extract.htm

p7zip_4.47/DOCS/MANUAL/commands/add.htm

p7zip_4.47/DOCS/MANUAL/commands/list.htm

p7zip_4.47/DOCS/MANUAL/commands/test.htm

p7zip_4.47/DOCS/MANUAL/commands/index.htm

p7zip_4.47/DOCS/MANUAL/commands/extract_full.htm

p7zip_4.47/DOCS/MANUAL/commands/style.css

p7zip_4.47/DOCS/MANUAL/commands/update.htm

p7zip_4.47/DOCS/MANUAL/commands/bench.htm

--중략--

p7zip_4.47/DOCS/MANUAL/switches/yes.htm

p7zip_4.47/DOCS/MANUAL/switches/ar_no.htm

p7zip_4.47/DOCS/MANUAL/switches/list_tech.htm

p7zip_4.47/DOCS/MANUAL/switches/stop_switch.htm

p7zip_4.47/DOCS/MANUAL/switches/exclude.htm

p7zip_4.47/DOCS/MANUAL/switches/password.htm

p7zip_4.47/DOCS/MANUAL/switches/ar_exclude.htm

p7zip_4.47/DOCS/MANUAL/switches/include.htm

p7zip_4.47/DOCS/MANUAL/switches/overwrite.htm

p7zip_4.47/README

p7zip_4.47/TODO


3. 설치하기

[root@fc6 p7zip_4.47]# ./install.sh

- installing /usr/local/bin/7za

- installing /usr/local/bin/7zr

- installing /usr/local/lib/p7zip/7zCon.sfx

- installing /usr/local/bin/7z

- installing /usr/local/man/man1/7z.1

- installing /usr/local/man/man1/7za.1

- installing /usr/local/man/man1/7zr.1

- installing /usr/local/share/doc/p7zip/README

- installing /usr/local/share/doc/p7zip/ChangeLog

- installing HTML help in /usr/local/share/doc/p7zip/DOCS


3. 사용법


우선 도움말을 확인해 보자

[root@fc6 ~]# 7z --help


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]

[<@listfiles...>]


<Commands>

a: Add files to archive

b: Benchmark

d: Delete files from archive

e: Extract files from archive (without using directory names)

l: List contents of archive

t: Test integrity of archive

u: Update files to archive

x: eXtract files with full paths

<Switches>

-ai[r[-|0]]{@listfile|!wildcard}: Include archives

-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives

-bd: Disable percentage indicator

-i[r[-|0]]{@listfile|!wildcard}: Include filenames

-m{Parameters}: set compression Method (see the manual)

-l: don't store symlinks; store the files/directories they point to

CAUTION : the scanning stage can never end because of symlinks like '..'

(ex: ln -s .. ldir)

-o{Directory}: set Output directory

-p{Password}: set Password

-r[-|0]: Recurse subdirectories

(CAUTION: this flag does not do what you think, avoid using it)

-sfx[{name}]: Create SFX archive

-si[{name}]: read data from stdin

-slt: show technical information for l (List) command

-so: write data to stdout (eg: 7z a dummy -tgzip -so Doc.txt > archive.gz)

-t{Type}: Set type of archive

-v{Size}[b|k|m|g]: Create volumes

-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options

-w[path]: assign Work directory. Empty path means a temporary directory

-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames

-y: assume Yes on all queries


<명령어>부분을 간략히 정리를 해보면 아래의 표와 같이 정리할 수 있다.


명령어

설명

a

압축하기

b

성능보기

d

삭제하기

e

경로명 없이 압축풀기

l

압축목록보기

t

테스트

u

업데이트

x

경로명과 함께 압축풀기



그밖에 명령어와 함께 쓰일 수 있는 옵션 스윗치.


-i (Include)

-m (Method)

-p (Set Password)

-r (Recurse)

-sfx (create SFX)

-si (use StdIn)

-so (use StdOut)

-t (Type of archive)

-u (Update)

-v (Volumes)

-w (Working Dir)

-x (Exclude)


3-1 압축하기

a (Add) 명령어


아카이브로 묶고 파일을 압축한다.


예제))


원본 파일을 아카이브 파일로 묶기

[root@fc6 ~]# 7z a -tzip archive aa bb cc dd ee


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)

Scanning


Creating archive archive.zip


Compressing aa

Compressing bb

Compressing cc

Compressing dd

Compressing ee


Everything is Ok


아카이브 파일 7z, gzip, bzip2로 압축하기

[root@fc6 ~]# 7z a archive.zip.7z archive.zip


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)

Scanning


Creating archive archive.zip.7z


Compressing archive.zip


Everything is Ok


[root@fc6 ~]# tar cvfz archive.zip.tar.bz archive.zip

archive.zip

[root@fc6 ~]# tar cvfj archive.zip.tar.bz2 archive.zip

archive.zip

[root@fc6 ~]# ls -lh archive*

-rw------- 1 root root 108K 530 01:38 archive.zip

-rw------- 1 root root 8.1K 530 01:40 archive.zip.7z

-rw-r--r-- 1 root root 9.5K 530 01:42 archive.zip.tar.bz

-rw-r--r-- 1 root root 14K 530 01:42 archive.zip.tar.bz2


확인결과 압축률은 7z > gzip > bzip2의 순서로 월등히 높음을

볼 수 있다.


3-2 아카이브 파일 테스트

t (Test integrity of archive) 명령어


아카이브 파일의 테스트


))

[root@fc6 ~]# 7z t archive.zip


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Processing archive: archive.zip


Testing aa

Testing bb

Testing cc

Testing dd

Testing ee


Everything is Ok



3-3 업데이트


u (Update) 명령어


기존에 아카이브 파일로 묶은 파일에 추가 또는 Update를 할때 사용된다.


))

테스트를 위해 aa파일을 ff에 복사한다.

[root@fc6 ~]# cp aa ff


아카이브 파일에 업데이트를 실행한다.

[root@fc6 ~]# 7z u archive.zip ff


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Scanning


Updating archive archive.zip


Compressing ff


Everything is Ok


[root@fc6 ~]# ls -lh archive*

-rw------- 1 root root 129K 530 01:58 archive.zip

-rw------- 1 root root 8.1K 530 02:05 archive.zip.7z

-rw-r--r-- 1 root root 9.5K 530 01:42 archive.zip.tar.bz

-rw-r--r-- 1 root root 14K 530 01:42 archive.zip.tar.bz2



3-4 목록보기


l (List contents of archive) 명령어


아카이브 항목의 리스트 보기


))

[root@fc6 ~]# 7z l archive.zip


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Listing archive: archive.zip


Date Time Attr Size Compressed Name

------------------- ----- ------------ ------------ ------------

2007-05-30 00:34:38 ....A 1711770 21910 aa

2007-05-30 00:35:16 ....A 1711770 21910 bb

2007-05-30 00:35:22 ....A 1711770 21910 cc

2007-05-30 00:35:30 ....A 1711770 21910 dd

2007-05-30 01:28:28 ....A 1711770 21910 ee

2007-05-30 01:43:22 ....A 1711770 21910 ff

------------------- ----- ------------ ------------ ------------

10270620 131460 6 files

[root@fc6 ~]# 7z l archive.zip.7z


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Listing archive: archive.zip.7z


Date Time Attr Size Compressed Name

------------------- ----- ------------ ------------ ------------

2007-05-30 01:58:29 ....A 131962 8163 archive.zip

------------------- ----- ------------ ------------ ------------

131962 8163 1 files


3-5 삭제하기


d (Delete) 명령어


아카이브내 파일 삭제


))

3-6 삭제하기

[root@fc6 ~]# 7z d archive.zip ee


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Updating archive archive.zip


Everything is Ok



확인하기

[root@fc6 ~]# 7z l archive.zip


7-Zip 4.47 beta Copyright (c) 1999-2007 Igor Pavlov 2007-05-27

p7zip Version 4.47 (locale=ko_KR,Utf16=on,HugeFiles=on,2 CPUs)


Listing archive: archive.zip


Date Time Attr Size Compressed Name

------------------- ----- ------------ ------------ ------------

2007-05-30 00:34:38 ....A 1711770 21910 aa

2007-05-30 00:35:16 ....A 1711770 21910 bb

2007-05-30 00:35:22 ....A 1711770 21910 cc

2007-05-30 00:35:30 ....A 1711770 21910 dd

------------------- ----- ------------ ------------ ------------

6847080 87640 4 files


3-6

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,034 명
  • 현재 강좌수 :  35,787 개
  • 현재 접속자 :  214 명