728x90
mkdir 명령어
디렉터리 생성
$ mkdir tmp-directory
여러 단계의 디렉토리 생성
-p(--parents) 옵션을 사용하여 여러 단계의 디렉터리를 생성할 수 있습니다.
$ mkdir tmp/directory1/directory2/directory3
mkdir: `tmp/directory1/directory2/directory3' 디렉토리를 만들 수 없습니다: 그런 파일이나 디렉터리가 없습니다
$ mkdir -p tmp/directory1/directory2/directory3
권한 설정
-m(--mode=mode) 옵션을 사용하여 생성된 디렉토리에 대한 파일 모드(권한 등)를 설정할 수 있습니다
$ mkdir -m 777 -p tmp/directory1/directory2/directory3
$ ls -l tmp/directory1/directory2
합계 0
drwxrwxr-x 2 root root 6 1월 11 17:04 directory3
mkdir 옵션
$ mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.
Mandatory arguments to long options are mandatory for short options too.
-m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
-p, --parents no error if existing, make parent directories as needed
-v, --verbose print a message for each created directory
-Z set SELinux security context of each created directory
to the default type
--context[=CTX] like -Z, or if CTX is specified then set the SELinux
or SMACK security context to CTX
--help 이 도움말을 표시하고 끝냅니다
--version 버전 정보를 출력하고 끝냅니다
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Report mkdir translation bugs to <http://translationproject.org/team/>
For complete documentation, run: info coreutils 'mkdir invocation'
728x90
'리눅스' 카테고리의 다른 글
[리눅스] 시스템 로그 EDAC(Error Detection And Correction) 로그 (0) | 2022.01.12 |
---|---|
[명령어] rdate 명령어 | 시간 동기화 (0) | 2022.01.12 |
[명령어] mkdir 명령어 (0) | 2022.01.11 |
[Linux] How to install libmcrypt on CentOS 7.9 (0) | 2022.01.07 |
[리눅스] 무명1 (0) | 2021.12.30 |
[리눅스] DinD, DooD (0) | 2021.12.28 |