mkdir,rmdir

mkdir은 디렉토리를 만들때 사용하며, rmdir 은 디렉토리를 지울 때 사용하는 명령어 입니다.

-p 옵션을 주변 하위 디렉토리 까지 한번에 만들수 있습니다.

 

옵션

-p : 하위 디렉토리까지 한번에 생성하거나 삭제 

 

[root@localhost leeahnlee]# mkdir /test
[root@localhost leeahnlee]# cd /test/
[root@localhost test]# pwd
/test
[root@localhost test]# mkdir sub1/sub2/sub3
mkdir: `sub1/sub2/sub3' 디렉토리를 만들 수 없습니다: 그런 파일이나 디렉토리가 없음
[root@localhost test]# mkdir -p sub1/sub2/sub3
[root@localhost test]# cd sub1/sub2/sub3/
[root@localhost sub3]# pwd
/test/sub1/sub2/sub3 

 

'Linux > Linux 명령어' 카테고리의 다른 글

Linux 명령어 cp  (0) 2013.06.02
Linux 명령어 touch  (0) 2013.06.02
linux 명령어 cd  (0) 2013.06.01
Linux 명령어 ls  (0) 2013.06.01
Linux 명령어 pwd  (0) 2013.06.01