2008. 3. 30. 22:07 Unix
cpio로 파일옮기기
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 2965 - March 19, 2008
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
cpio로 파일 옮기기
한 디렉토리 또는 파일시스템에서 다른 디렉토리 또는 파일시스템으로
옮겨야 할 대량의 파일이 있을 경우 다음의 명령을 이용하라.
# find /old_directory -depth | cpio -pdmv /new_directory
이 명령은 소유자와 권한, 디렉토리 구조를 유지하면서 지정한
old_directory 밑의 모든 파일을 new_directory로 옮길 것이다.
---------------------------------------------------------------------
MOVING FILES WITH CPIO
If you have a multitude of
files to move from one
directory or filesystem to
another, here's a one liner:
# find /old_directory -depth | cpio -pdmv /new_directory
This will move all of the
files under the specified
old_directory to the
new_directory, keeping the
same ownership, permissions,
and directory structure.