티스토리 뷰
파일관련 명령어
1. 파일 이동: mv
#>mv <src_path> <dst_path>
원주소 목적지
ex)
#>mv /dir1/file1 /dir2/passwd --> file1의 이름을 passwd로 변경
#>mv /dir2/passwd /dir2/file
#>mv /dir2/file /dir3/
-f --> 묻지않는다
ex)
#>mv -f /dir3/file /root/file2
#>rm -rf /root/*
#>mv /dir1 /root/
#>mv /dir2 /root/
#>mv /dir3 /root/
2. 파일 복사 : cp
#>cp <src_path> <dst_path>
ex)
#>cp /etc/passwd /root/
#>cp /etc/passwd /root/file1
#>cp /root/dir3 /root/dir4
-r
ex)
#>cp -r /root/dir3 /root/dir4
'LInux 1' 카테고리의 다른 글
6. 사용자 정리 Linux (0) | 2017.04.10 |
---|---|
5. 쉘(Shell) 정리 Linux (0) | 2017.04.10 |
3. 파일 내용확인 및 수정 정리 Linux (0) | 2017.04.10 |
2. 일반 파일 정리 Linux (0) | 2017.04.10 |
1. 디렉터리 정리 Linux (0) | 2017.04.10 |