Next: Cleaning Up, Previous: Viewing And Editing, Up: Common Tasks [Contents][Index]
find
¤ÇÀ¸À®¤·¤¿¥Õ¥¡¥¤¥ë¥ê¥¹¥È¤ò¡¤¥Õ¥¡¥¤¥ë¥¢¡¼¥«¥¤¥Ö¥×¥í¥°¥é¥à¤ËÅÏ
¤¹¤³¤È¤â²Äǽ¤Ç¤¹¡¥GNU tar
¤Ècpio
¤Ï¡¤¤É¤Á¤é¤âɸ½àÆþÎϤ«¤é¥Õ¥¡
¥¤¥ë̾¤Î¥ê¥¹¥È¤òÆÉ¤ß¹þ¤à¤³¤È¤¬²Äǽ¤Ç¤¹—¥Ì¥ë(°ÂÁ´¤ÊÊýË¡)¡¤¤Þ¤¿¤Ï¡¤¶õÇò
(´Êñ¤À¤¬´í¸±¤Ê¥Ç¥Õ¥©¥ë¥È¤ÎÊýË¡)¤Î¤É¤Á¤é¤«¤ÇʬΥ¤·¤Þ¤¹¡¥¥Ì¥ë¤Ç̾Á°¤òʬ
Î¥¤¹¤ëÊýË¡¤ò»ÈÍѤ¹¤ë¤¿¤á¡¤‘--null’¥ª¥×¥·¥ç¥ó¤òÍ¿¤¨¤Æ¤¯¤À¤µ¤¤¡¥¥Õ¥¡
¥¤¥ë¥¢¡¼¥«¥¤¥Ö¤ò¥Õ¥¡¥¤¥ë¤ËÊݸ¤·¤¿¤ê¡¤¥Æ¡¼¥×¤Ë½ñ¤½Ð¤·¤¿¤ê¡¤¥Í¥Ã¥È¥ï¡¼
¥¯±Û¤·¤Î¾¤Î¥Þ¥·¥ó¤ËŸ³«¤·¤¿¤ê¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£
¥Õ¥¡¥¤¥ë¤ò¥¢¡¼¥«¥¤¥Ö¤¹¤ë°ìÈÌŪ¤Êfind
¤Î»ÈÍÑÊýË¡¤Ï¡¤¥Ç¥£¥ì¥¯¥È¥ê¥Ä
¥ê¡¼Æâ¤Î¥Õ¥¡¥¤¥ë¥ê¥¹¥È¤òcpio
¤ËÁ÷¤ëÊýË¡¤Ç¤¹¡¥½êͼԤ¬¥Ç¥£¥ì¥¯¥È¥ê
¤Ë½ñ¤¹þ¤ß¸¢¸Â¤¬Ìµ¤¤¾ì¹ç¤Ï‘-depth’¤ò»ÈÍѤ·¡¤(¤½¤Î¾ì¹ç)¥Ç¥£¥ì¥¯¥È¥ê
¤Î¸¢¸Â¤Ï¤½¤Î¥³¥ó¥Æ¥ó¥Ä¤Î¥ê¥¹¥È¥¢¸å¤Ë¥ê¥¹¥È¥¢¤µ¤ì¤ë¤¿¤á¡¤¤½¤Î¥³¥ó¥Æ¥ó¥Ä
¤ò¥¢¡¼¥«¥¤¥Ö¤«¤é¥ê¥¹¥È¥¢¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡¥¤³¤¦¤¹¤ë¤¿¤á¤Ëcpio
»È
ÍѤ·¤¿Î㤬¤³¤³¤Ë¤¢¤ê¤Þ¤¹¡¥ÆÃÄê¤Î¥Õ¥¡¥¤¥ë¤Î¤ß¥¢¡¼¥«¥¤¥Ö¤¹¤ë¤¿¤á¤Ë¡¤¤è¤ê
Ê£»¨¤Êfind
¤Î¼°¤ò»ÈÍѤ¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡¥
find . -depth -print0 | cpio --create --null --format=crc --file=/dev/nrst0
°Ê²¼¤Î¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Æ¡¤¤½¤Î¥¢¡¼¥«¥¤¥Ö¤ò¥ê¥¹¥È¥¢¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡¥
cpio --extract --null --make-dir --unconditional \ --preserve --file=/dev/nrst0
Ʊ¤¸¤³¤È¤òtar
¤ò»ÈÍѤ·¤Æ¹Ô¤Ê¤¦¥³¥Þ¥ó¥É¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥
find . -depth -print0 | tar --create --null --files-from=- --file=/dev/nrst0 tar --extract --null --preserve-perm --same-owner \ --file=/dev/nrst0
°ì¤Ä¤Î¥Þ¥·¥ó¤«¤é¾¤Î¥Þ¥·¥ó¤Ë¡¤¥Ç¥£¥ì¥¯¥È¥ê¤ò¥³¥Ô¡¼¤¹¤ëÎã¤Ï°Ê²¼¤Î¤è¤¦¤Ë ¤Ê¤ê¤Þ¤¹¡¥
find . -depth -print0 | cpio -0o -Hnewc | rsh other-machine "cd `pwd` && cpio -i0dum"