./coscli cp <source_path> <destination_path> [flags]
flag 약칭 | flag 전체 명칭 | flag 용도 |
없음 | --include | 특정 패턴이 포함된 파일 |
없음 | --exclude | 특정 패턴이 제외된 파일 |
-r | --recursive | 폴더의 모든 파일 재귀적 순회 여부 |
없음 | --storage-class | 파일 유형 지정(기본값: STANDARD) |
없음 | --part-size | 파일 파트 크기(기본값: 32MB), 단위 MB |
없음 | --thread-num | 동시 스레드 수(기본값: 5) |
없음 | --rate-limiting | 단일 링크 속도 제한(0.1~100MB/s), 단위 MB/s |
없음 | --meta | 특정 HTTP 표준 속성(HTTP Header) 및 x-cos-meta- 접두사가 붙은 사용자 정의 메타데이터(User Meta)를 포함한 업로드된 파일의 메타데이터입니다. 파일 메타데이터는 header:value#header:value 형식으로 Expires:2022-10-12T00:00:00.000Z#Cache-Control:no-cache#Content-Encoding:gzip#x-cos-meta-x:x 와 같습니다. |
--part-size
보다 큰 경우 COSCLI는 먼저 파일을 --part-size
로 나눈 다음 --thread-num
스레드를 사용하여 업/다운로드 작업을 동시 실행합니다.--rate-limiting
매개변수를 사용하여 단일 링크의 속도를 제한할 수 있습니다. 동시 업/다운로드가 활성화된 경우 총 속도는 --thread- num * --rate-limiting
입니다.--include
및 --exclude
는 표준 정규식 구문을 지원하므로, 파일 특정 조건 필터링에 사용할 수 있습니다../coscli cp ~/test/ cos://bucket1/example/ -r --include ".*.txt" --meta=x-cos-meta-a:a#ContentType:text#Expires:2022-10-12T00:00:00.000Z
./coscli cp ~/example.txt cos://bucket1/example.txt
./coscli cp ~/test/ cos://bucket1/example/ -r
./coscli cp ~/test/ cos://bucket1/example/ -r --include .*.mp4
./coscli cp ~/test/ cos://bucket1/example/ -r --exclude .*.md
./coscli cp dir/ cos://bucket1/example/ -r --exclude dirD/.*
./coscli cp ~/test/ cos://bucket1/example/ -r --storage-class ARCHIVE
./coscli cp ~/file.txt cos://bucket1/file.txt --rate-limiting 1.3
./coscli cp cos://bucket1/example.txt ~/example.txt
./coscli cp cos://bucket1/example/ ~/test/ -r
./coscli cp cos://bucket1/example/ ~/test/ -r --include .*.mp4
./coscli cp cos://bucket1/example/ ~/test/ -r --exclude .*.md
./coscli cp cos://bucket1/example.txt cos://bucket1/example_copy.txt
./coscli cp cos://bucket1/example.txt cos://bucket2/example_copy.txt
./coscli cp cos://bucket1/example1/ cos://bucket2/example2/ -r
./coscli cp cos://bucket1/example1/ cos://bucket2/example2/ -r --include .*.mp4
./coscli cp cos://bucket1/example1/ cos://bucket2/example2/ -r --exclude .*.md
문제 해결에 도움이 되었나요?