반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- oid2nae #postgresql
- EDB
- Network #TCP #IP #Netmask #Host
- postgresql
- linux #filesystem #linuxdirectory
- SQL_COMMANDS #DDL #DML #TCL
- High_Availability
- Replication
- postgresql #system_memory #local_memory #shared_memory #postgresql_architecture
- postgresql_fdw
- Linux #linux_tar #split
- glossary #database #termins #postgresql #postgresql_architecture
- repmgr #postgresql #replication #HA
- RAM #CPU #CS #Computer_Science #Terms
- inux #ome_dir #unix #linux_commands #linux_useradd #useradd
- chatgpt3 #AI #datascience
- network #network_terminology #network_protocols
- SQL_VIEW #SQL #VIEW
- dbms
- database #dbms #objects #sql #schema #table #functions
- SQL #NULL #NOT_NULL
- SQL_basic
- postgresql #vacuum #full_vacuum #verbose
- the_one_thing
- join #postgresql #sql #database
- one_thin
- data_oid
- Database
- postgresql #pgadmin #port #firewalld
- streaming_replication
Archives
- Today
- Total
i am lazy
Linux file copy command 본문
728x90
반응형

Linux cp이란 ?
cp 는 파일과 디렉토리를 복사 하는 Linux 셸 명령입니다.
cp command syntax
cp [OPTION] Source Directory
단일 파일 test.txt 를 대상 디렉토리 /test 에 복사:
cp test.txt /test
2 개 파일 복사
cp test.txt test1.txt /test
현재 디렉토리의 모든 text 파일을 복사
cp *.txt /test
test 디렉토리를 절대 경로 디렉토리 /home/usr/ 로 복사
cp test /home/usr/
test 의 모든 파일과 디렉토리 를 하위 디렉토리 /test_dir 에 복사
cp -R test /test_dir
현재 디렉토리의 모든 파일 업데이트 - 최신 파일만 대상 디렉토리 /test 에 복사
cp -u * /test
자주 사용하는 옵션들:
-i : 복사될 파일이 이름이 이미 존재할 경우, 사용자에게 덮어 쓰기 여부를 묻습니다.
-b : 복사될 파일이 이름이 이미 존재할 경우, 백업파일을 생성합니다.
-f : 복사 될 파일이 이름이 이미 존재 할 경우, 강제로 덮어쓰기 합니다.
-r : 하위 디렉토리 까지 모두 복사합니다.
-a : 원본 파일의 속성, 링크 정보까지 모두 복사합니다.
-p : 원본 파일의 소유자, 그룹, 권한 등의 정보까지 모두 복사합니다.
-v : 복사 진행 상태를 출력합니다
728x90
반응형
'Linux' 카테고리의 다른 글
Linux userdel command (1) | 2022.10.04 |
---|---|
Linux user home directory 변경 (0) | 2022.10.04 |
Linux chown command (1) | 2022.10.04 |
Linux mkdir command (0) | 2022.10.03 |
Linux grep command (2) | 2022.09.30 |
Comments