»ç¼ö¸¶
2002/11/01 05:13:06
11326
0
tar (¹é¾÷Çϱâ)
http://thinkit.or.kr/linux_s/ÀÇ
¾È¹Î±â´ÔÀÌ ÀÛ¼ºÇϽŠ±ÛÀ» °¡Á®´Ù ¿Ã¸³´Ï´Ù..
ÀÛÀº µµ¿òÀ̳ª¸¶ µÇ¼ÌÀ¸¸é ÇÕ´Ï´Ù.
tar (¹é¾÷Çϱâ)
¾ÆÄ«À̺ê(archive)·Î ¸¸µé¾î¼ ¹é¾÷ÇÒ ¶§ »ç¿ëÇÏ´Â ¸í·É¾îÀÌ´Ù. ÀÌ ¶§¿¡´Â ¾ÐÃàÀº ÇÏÁö ¾Ê°í, ¹±â¸¸ ÇÑ´Ù. ¿Ö³ÄÇϸé, ¾ÐÃàÀº ÀϺΠ¼Õ»óÀÌ »ý±â´õ¶óµµfile Àüü¸¦ »ì¸± ¼ö°¡ ¾ø±â ¶§¹®ÀÌ´Ù.
¾î¶² fileµéÀ» ¾ÐÃàÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó, ¹¾îÁÖ´Â ¿ªÇÒÀ» ÇÑ´Ù. ±× ¾È¿¡ ÀÖ´Â ¾ÐÃà ¿É¼ÇÀ» »ç¿ëÇؼ ¾ÐÃàÀ» ÇÒ ¼ö ÀÖ´Ù.
ÁÖ¿ä ¿É¼Ç
¨ç c : create. file »õ·Î »ý¼º
¨è v : ¹ÀÏ ´ë»ó fileÀ̳ª directory¸¦ ȸ鿡 º¸¿©ÁØ´Ù.
¨é f : archive file¸íÀ» ÁöÁ¤ÇÒ ¶§ ¹Ýµå½Ã »ç¿ë
¨ê x : extract. ¹Àº °ÍÀ» ÇØÁ¦ÇÒ ¶§
¨ë z : gzipÀ¸·Î ¾ÐÃà/ÇØÁ¦¸¦ ÀÌ¿ëÇÑ´Ù.
¨ì t : tar³ª tar.gz¿¡ µé¾îÀÖ´Â ³»¿ëÀ» È®ÀÎ
¨í j : bzip2À¸·Î ¾ÐÃà/ÇØÁ¦¸¦ ÀÌ¿ëÇÑ´Ù.
¨î Z : compress¿Í °ü·ÃµÈ ¾ÐÃ༳Á¤ ¹× ÇØÁ¦¿¡ »ç¿ë
¨ï r : ¹ÀÎ file ¾È¿¡ ¶Ç ´Ù¸¥ file Ãß°¡
¨ð u : ¾ÆÄ«À̺êÀÇ ¾÷µ¥ÀÌÆ®
¿¹Á¦)
[
root@localho.t
/root]# tar cvf mk.tar tar_test
/* tar_test directory¿¡ ÀÖ´Â fileµéÀ» mk.tar·Î ¹±â */
tar_test/
tar_test/lilo.conf
tar_test/inittab
tar_test/fstab
[
root@localho.t
/root]#tar tvf mk.tar /* tarÀÇ ³»¿ëÀ» º¸±â */
[
root@localho.t
/root]#rm -rf tar_test/ /* ¿øº»ÀÎ tar_test directory »èÁ¦ */
[
root@localho.t
/root]#tar xvf mk.tar /* mk.tar¸¦ Ç®¾îÁØ´Ù. */
tar_test/ ¡æ directory°¡ ¸ÕÀú »ì¾Æ³ª°í,
tar_test/lilo.conf ¡æ ³ª¸ÓÁö fileµéµµ ¿ø·¡ À§Ä¡´ë·Î °£´Ù.
tar_test/inittab
tar_test/fstab
[
root@localho.t
/root]#tar cvfz mk.tar.gz tar_test
/* fileµéÀ» ¹À¸¸é¼ gzipÀ¸·Î ÆÄÀÏ ¾ÐÃàÇÔ. */
tar_test/ ¹Ýµå½Ã gz±îÁö ºÙ¿©¼ file¸íÀ» ÁÖµµ·Ï ÇÑ´Ù.
tar_test/lilo.conf »ó´ë¹æµµ ¾ÐÃàÀÓÀ» ¾Ë°í z ¿É¼ÇÀ» »ç¿ëÇÏ°ÚÁÒ. ^^
tar_test/inittab
tar_test/fstab
tar_test/termcap
[
root@localho.t
/root]#ls -l mk.tar* /* ¹ÀÎ file°ú ¾ÐÃà±îÁö ÇÑ fileÀÇ ¿ë·®À» ºñ±³ */
-rw-r--r-- 1 root root 737280 1¿ù 16 11:44 mk.tar ¡æ ±×³É ¹Àº °Í
-rw-r--r-- 1 root root 236758 1¿ù 16 11:43 mk.tar.gz ¡æ gzipÀ¸·Î ¾ÐÃàÇÑ°Í
[
root@localho.t
/root]#tar xvfz mk.tar.gz /* ¾ÐÃà Ç®±â */
[
root@localho.t
/root]#tar xvfz mk.tar.gz -C /home/mk ©£ /home/mk(´Ù¸¥ directory)¿¡ ¾ÐÃàÇ®±â
µÎ´Ü°è·Î ¾ÐÃàÇϱâ(tar cvf·Î ¹Àº µÚ gzip, compress³ª bzip2·Î ¾ÐÃà)
¢À gzip ÀÌ¿ë
[
root@localho.t
/root]# tar cvf mk.tar tar_test
[
root@localho.t
/root]# gzip mk.tar /* gzipÀ¸·Î ¾ÐÃàÇϱâ. mk.tar.gz¶ó´Â fileÀÌ »ý¼ºµÈ´Ù */
[
root@localho.t
/root]# rm -rf ter_test
[
root@localho.t
/root]# gzip -d mk.tar.gz /* ¾ÐÃà Ç®±â. gzip -d¸¦ gunzip ÀÌ¿ëÇصµ µÈ´Ù.. */
¢À bzip2 ÀÌ¿ë
[
root@localho.t
/root]# bzip2 mk.tar /* bzip2·Î ¾ÐÃàÇϱâ mk.tar.bz2¶ó´Â fileÀÌ »ý¼ºµÈ´Ù. */
[
root@localho.t
/root]# bzip2 -d mk.tar.bz2 /* bzip2 -d¸¦ bunzip2·Î ½áµµ µÈ´Ù. */
ÇÑ ¹ø¿¡ ¾ÐÃà°ú ¹ÀÎ °ÍÀ» ´Ù Ç®±â
[
root@localho.t
/root]# tar xvfj mk.tar.bz2
¢À compress ÀÌ¿ë
[
root@localho.t
/root]# compress mk.tar
/* compress·Î ¾ÐÃàÇϱâ mk.tar.Z ¶ó´Â fileÀÌ »ý¼ºµÈ´Ù. */
[
root@localho.t
/root]# uncompress mk.tar.Z
ÇÑ ¹ø¿¡ ¾ÐÃà°ú ¹ÀÎ °ÍÀ» ´Ù Ç®±â
[
root@localho.t
/root]# tar xvfZ mk.tar.Z
[Á¤¸®] ¾ÐÃàµÈ ¾ÆÄ«ÀÌºê ¸¸µå´Â ¹ý
[
root@localho.t
/root]# tar cvf mk.tar tar_test/
[
root@localho.t
/root]# gzip mk.tar
-> [
root@localho.t
/root]# tar cvfz mk.tar.gz tar_test/ /* Çѹø¿¡ ¾ÐÃàÇϱâ */
[
root@localho.t
/root]# tar cvf mk.tar tar_test/
[
root@localho.t
/root]# bzip2 mk.tar
-> [
root@localho.t
/root]# tar cvfj mk.tar.bz2 tar_test/ /* Çѹø¿¡ ¾ÐÃàÇϱâ */
[
root@localho.t
/root]# tar cvf mk.tar tar_test/
[
root@localho.t
/root]# compress mk.tar
-> [
root@localho.t
/root]# tar cvfZ mk.tar.Z tar_test/ /* Çѹø¿¡ ¾ÐÃàÇϱâ */
¾ÐÃà ÇØÁ¦ Çϴ¹ý
[
root@localho.t
/root]# gzip -d mk.tar.gz
[
root@localho.t
/root]# tar xvf mk.tar
-> [
root@localho.t
/root]# tar xvfz mk.tar.gz /* Çѹø¿¡ Ç®±â */
[
root@localho.t
/root]# bzip2 -d mk.tar.bz2
[
root@localho.t
/root]# tar xvf mk.tar
-> [
root@localho.t
/root]# tar xvfj mk.tar.bz2 /* Çѹø¿¡ Ç®±â */
[
root@localho.t
/root]# uncompress mk.tar.Z
[
root@localho.t
/root]# tar xvf mk.tar
-> [
root@localho.t
/root]# tar xvfZ mk.tar.Z /* Çѹø¿¡ Ç®±â */
¢À tar¿¡ file Ãß°¡ ¹× ¼öÁ¤ Çϱâ
[
root@localho.t
/root]# tar rvf mk.tar cat_test /* cat_test¶ó´Â fileÀ» ¾ÆÄ«À̺ê¼Ó¿¡ Ãß°¡ */
cat_test
[
root@localho.t
/root]# tar tvf mk.tar /* Ãß°¡ µÇ¾ú´ÂÁö ¸ñ·Ï È®ÀÎ */
[
root@localho.t
/root]# cp /etc/resolv.conf tar_test/
/* mk.tarÀÇ ¿øº»ÀÎ tar_test directory¿¡ file º¹»ç */
[
root@localho.t
/root]# tar uvf mk.tar tar_test
/* tar_testÀÇ ³»¿ë°ú mk.tarÀÇ ³»¿ëÀ» ºñ±³ÇÏ¿© ´Þ¶óÁø tar_test/resolv.conf °ÍÀÌ ÀÖÀ¸¸é updateÇÏ°í, ¸ñ·ÏÀ» º¸¿©ÁØ´Ù. */
¢À ¾ÆÄ«ÀÌºê ¼ÓÀÇ Æ¯Á¤ÆÄÀÏ »èÁ¦
[
root@localho.t
/root]# tar --list --file=collection.tar
blues
folk
jazz
rock
[
root@localho.t
/root]# tar --delete --file=collection.tar blues
[
root@localho.t
/root]# tar --list --file=collection.tar
folk
jazz
rock
¢À ¾ÆÄ«ÀÌºê ¼ÓÀÇ Æ¯Á¤ÇÑ ÆÄÀϸ¸ Ç®±â
[
root@localho.t
/root]# tar --extract --file=collection.tar blues
[Âü°í] :
http:///mmlab.ce.cnu.ac.kr/ftp/pub/gnu/Manuals/tar-1.12/html_node/tar_58.html
ÄÚ¸àÆ®¸¦ ÀÛ¼ºÇϽøé 2 Æ÷ÀÎÆ®°¡ Áö±ÞµË´Ï´Ù.
280
¿©·¯°¡Áö ¿îµ¿È²ö ¹´Â ¹æ¹ý!!
[2]
½ÅÀ¯
01/11
12130
05/21(10:48)
279
XPÀÇ ÀÚµ¿ ²¨Áü ¿¹¾àÇϱâ
[6]
½ÅÀ¯
01/11
14232
01/20(01:07)
311
@@ ÀÚµ¿Â÷ ¿¬·á Àý°¨ÇÒ¼ö ÀÖ´Â ¹æ¹ý @@
[1]
½º½Ã¿Õ
01/28
22913
09/06(12:25)
79
ÆÛ¹Ì¼Ç È¦¶û ´Ù ¹Ù²Ù±â.
¼Û±º
05/27
10454
78
alias¸¦ ÀÌ¿ëÇؼ dir¸í·ÉÀ» »ç¿ëÇÏÀÚ
¼Û±º
05/27
10384
55
MySQL ºñ¹ø º¯°æÇϱâ
[2]
¼Û±º
03/15
10599
03/30(20:29)
45
¾Ë¸é Æí¸®ÇÑ À©µµ¿ì ´ÜÃàÅ°
[10]
¼Û±º
02/12
11527
02/20(17:19)
41
·£´ý ¹è°æÀ½¾Ç ¾Æ·¡º¸´Ù´Â °£´ÜÇÑ °Í °°¾Æ¼. ;
[1]
¼Èñ¿ø
01/25
10541
01/25(23:14)
72
¢º ÀÚü ·Î±×¾Æ¿ô ³ªµµ ¼³Ä¡Çغ¸Àð!!!!
[1]
¼Å¿õ
05/11
13243
09/21(08:43)
71
³ëÇÁ·¹ÀÓ È¨ÆäÀÌÁö¿¡¼ Ä«Å×°í¸®¸¦ »ç¿ëÇÒ¶§ Å×ÀÌ...
¼Å¿õ
05/11
10456
70
ActiveX control...
¼Å¿õ
05/11
10515
183
À̹ÌÁö »çÀÌÁî ÁÙÀ̱â..
[1]
»çźÀÇÀÎÇü
05/19
11695
05/23(14:02)
182
¾Æ¿ô·è °è¿ ½ÇÇà½Ã ¾ÏÈ£°É±â..
»çźÀÇÀÎÇü
05/04
11748
111
[linux] ¸ðÁú¶ó¿¡¼ µ¿¿µ»óº¸±â
»ç¼ö¸¶
11/22
11409
>>
tar (¹é¾÷Çϱâ)
»ç¼ö¸¶
11/01
11326
FIRST
5
6
7
8
9
10
11
18
LAST
ÄÄÇ»Áî´åÄÄ(´ëÇ¥ ÀåÁ¤ÁÖ) ÀÎõ±¤¿ª½Ã µ¿±¸ ¹æÃà·Î83¹ø±æ 23, 24µ¿ 333È£
»ç¾÷ÀÚµî·Ï¹øÈ£ 137-05-83351, Åë½ÅÆǸŠÀÎõ µ¿±¸ 03-78È£, °³ÀÎÁ¤º¸Ã¥ÀÓÀÚ ÀåÁ¤ÁÖ