# cp -rpV --preserve=context /mnt/disk1/www /mnt/disk2/www
웹소스를 다른 경로에 옮기기 위해서는 소유자(nginx:nginx), selinux context(httpd_sys_content_t) 속성도 포함시켜야 합니다.
옵션
-r : 원본위치 하위폴더를 포함해서 복사
-V : verbose
-p : 원본파일 모드,소유자,시간정보를 포함해서 복사(mode, ownership,timestamps)
--preserve[=ATTR_LIST] : context, link 옵션
https://linuxconfig.org/copy-a-file-while-preserving-selinux-context-on-linux
Copy a file while preserving SELinux context on Linux - LinuxConfig.org
linuxconfig.org
https://webdir.tistory.com/139
리눅스 cp - 복사
cp cp는 파일을 복사하는 명령어로서 copy의 약어이다. 파일이나 디렉토리를 복사할때 사용한다. test 파일을 test.bak 으로 복사 cp test test.bak home 디렉토리의 하위 디렉토리까지 home2 디렉토리로 복사 cp..
webdir.tistory.com
'Linux > 기본명령어&팁' 카테고리의 다른 글
cron 2주, 특정요일에 한번씩 실행하는 방법 (0) | 2020.02.16 |
---|---|
smartctl (디스크 정보 및 검사) (0) | 2020.02.09 |
watch 를 이용한 실시간 모니터링 (0) | 2019.04.16 |
crontab 명령어 (0) | 2019.01.17 |
find 사용법 (0) | 2017.03.20 |
# cp -rpV --preserve=context /mnt/disk1/www /mnt/disk2/www
웹소스를 다른 경로에 옮기기 위해서는 소유자(nginx:nginx), selinux context(httpd_sys_content_t) 속성도 포함시켜야 합니다.
옵션
-r : 원본위치 하위폴더를 포함해서 복사
-V : verbose
-p : 원본파일 모드,소유자,시간정보를 포함해서 복사(mode, ownership,timestamps)
--preserve[=ATTR_LIST] : context, link 옵션
https://linuxconfig.org/copy-a-file-while-preserving-selinux-context-on-linux
Copy a file while preserving SELinux context on Linux - LinuxConfig.org
linuxconfig.org
https://webdir.tistory.com/139
리눅스 cp - 복사
cp cp는 파일을 복사하는 명령어로서 copy의 약어이다. 파일이나 디렉토리를 복사할때 사용한다. test 파일을 test.bak 으로 복사 cp test test.bak home 디렉토리의 하위 디렉토리까지 home2 디렉토리로 복사 cp..
webdir.tistory.com
'Linux > 기본명령어&팁' 카테고리의 다른 글
cron 2주, 특정요일에 한번씩 실행하는 방법 (0) | 2020.02.16 |
---|---|
smartctl (디스크 정보 및 검사) (0) | 2020.02.09 |
watch 를 이용한 실시간 모니터링 (0) | 2019.04.16 |
crontab 명령어 (0) | 2019.01.17 |
find 사용법 (0) | 2017.03.20 |