=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP
 
                       Unix Tip 2327 - May 16, 2006
 
                   http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
cpio로 디렉토리구조(tree) 복사하기
 
표준 Unix tar를 사용하여 디렉토리구조를 복사하게 되면 원래의 복사하는 동안
디렉토리와 파일에 대한 소유자와 그룹정보를 보존하지 않는다.
이 정보를 보존하기 위해서 다음과 같은 방법으로 find(1)와 pipe를 통해
cpio(1)를 사용하라.
 
% cd <원본 디렉토리>
% find . -depth -print | cpio -pudm <대상 디렉토리>
 
이 명령은 <원본 디렉토리>의 디렉토리 구조에 대한 미러 이미지를 <대상 디렉토리>에
생성할 것이다.
 
@@@@@@@@@@@@@@@@@@@@[ 원문 ]@@@@@@@@@@@@@@@@@@@@
 
COPY A TREE WITH CPIO
 
Using standard UNIX tar to copy a
tree doesn't preserve the original
owner and group information for the
directories and files during the copy.
To do this, use find(1) piped to cpio(1)
this way:
 
% cd <source-directory>
% find . -depth -print | cpio -pudm <dest-directory>
 
This will create a mirror image of the
<source-directory> tree in <dest-directory>.
반응형
Posted by She쥐포s

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.4
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

최근에 올라온 글

최근에 달린 댓글

글 보관함