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 | 31 |
Tags
- Python DataFrame
- PYTHON
- it 용어
- MariaDB
- 오라클
- Algorithm
- RFP
- 파이썬
- 코딩테스트
- 리눅스
- VirtualBox
- 파이썬 알고리즘
- python algorithm
- putty
- 파이썬 데이터프레임
- it용어
- 데이터베이스
- 리눅스 명령어
- dbeaver
- Oracle
- 알고리즘
- 파이썬 전처리
- sql
- C#
- tibero
- linux
- Oracle VM VirtualBox
- HTML
- Python 라이브러리
- csharp
Archives
- Today
- Total
오경석의 개발노트
Linux_chgrp(change group): 파일이나 디렉터리의 그룹 변경 본문
■ chgrp(change group) : 파일 시스템 오브젝트에 연결된 그룹을 변경하는 명령어. 그룹을 변경하려면 슈퍼유저(root) 권한이거나 파일 소유자여야한다. 또한 현재 사용자는 그룹이 지정한 그룹 프로파일에 대한 *USE 권한이 있어야 한다.
■ 구조
chgrp [options] group sample [sample2...]
■ 옵션
● -R : 재귀적으로 파일들과 디렉터리들의 모드들을 바꾼다.
※ -R 이외에는 거의 사용되지 않아 생략
■ 예시
● sample 디렉터리의 그룹을 user1으로 변경
[root@TEST test]# ls -l
total 0
drwxr-xr-x. 2 root root 6 Jan 15 03:57 sample
[root@TEST test]# chgrp user1 sample/ ############################## sol
[root@TEST test]# ls -l
total 0
drwxr-xr-x. 2 root user1 6 Jan 15 03:57 sample
● sample 디렉터리 아래의 모든 파일 및 서브디렉터리의 그룹을 user1으로 변경
[root@TEST test]# ls -l
total 0
drwxr-xr-x. 2 root root 6 Jan 15 03:57 sample
[root@TEST test]# chgrp -R user1 sample/ ############################## sol
[root@TEST test]# ls -l
total 0
drwxr-xr-x. 2 root user1 6 Jan 15 03:57 sample
● 현재 디렉터리 아래의 모든 파일 및 서브디렉터리의 그룹을 user2으로 변경
[root@TEST test]# ls -l
total 0
drwxr-xr-x. 2 root user1 21 Jan 15 04:00 sample
-rw-r--r--. 1 root root 0 Jan 15 04:36 sample2
[root@TEST test]# chgrp user2 * ################################ sol
[root@TEST test]# ls -l
total 0
drwxr-xr-x. 2 root user2 21 Jan 15 04:00 sample
-rw-r--r--. 1 root user2 0 Jan 15 04:36 sample2
출처 : https://ko.wikipedia.org/wiki/Chgrp
chgrp - 위키백과, 우리 모두의 백과사전
위키백과, 우리 모두의 백과사전.
ko.wikipedia.org
출처 : https://www.ibm.com/docs/ko/i/7.3?topic=directories-chgrp
chgrp - 파일 그룹 소유권 변경
요약 chgrp [-R [ -H | -L | -P ]] [ -h ] group file ... 설명 chgrp를 사용하여 파일의 그룹을 그룹이 지정한 그룹 ID 또는 프로파일로 설정할 수 있습니다. 그룹 ID를 변경하려면 다음 권한 중 하나가 있어야
www.ibm.com
'소프트웨어, 운영체제 > Linux' 카테고리의 다른 글
Linux_ssh: 서버 간 접속 (0) | 2024.02.11 |
---|---|
Linux_tree: 파일과 디렉터리를 트리 형태로 출력 (0) | 2024.01.20 |
Linux_chmod(change mode): 파일이나 디렉터리의 모드 변경 (1) | 2024.01.14 |
Linux_chown(change the owner of a file): 파일 및 디렉터리 소유권 변경 (1) | 2024.01.08 |
Linux_정의 및 특징 (0) | 2023.11.28 |
Comments