[Linux] 특정 디렉토리의 Tree 구조만 복사하기

2022. 11. 17. 09:48AI 기술

find . -type d | cpio -pdvm "/mnt/dataset/BrainCT/ASAN/1/png/"

원리

  1. find .   :   현재 디렉토리에서
  2. -type d   :   디렉토리 타입
  3. cpio -pdvm : cpio를 이용하여 복사
  4. "~~~" : 목적지 경로