Difference between revisions of "Mkdir"
From Knoppix Documentation Wiki
(Init from PHPWiki) |
(darcelco) |
||
Line 1: | Line 1: | ||
+ | ouorolocac4t | ||
[[mkdir]] is the [[linux]] command used to create directories. You will hear directories referred to as folders. | [[mkdir]] is the [[linux]] command used to create directories. You will hear directories referred to as folders. | ||
Revision as of 04:00, 11 July 2008
ouorolocac4t mkdir is the linux command used to create directories. You will hear directories referred to as folders.
mkdir knoppixtest
The above command line would be used to create a directory named knoppixtest.
mkdir -p knoppixtest/3.9
The mkdir has a useful argument other than the directory name. The parent directory option is very nice. You can create a directory and all of the parent directories above the last directory in the directory path list that is separated by the slash, /.
mkdir knoppixtest mkdir knoppixtest/3.9
For example these two commands are the same as issuing mkdir -p knoppixtext/3.9.
mkdir -p /var/spool/mail
As the number of directories increases, then the create parent option becomes more valuable.
mkdir /var cd var mkdir spool cd spool mkdir mail cd mail
Compare the above command sequence with
mkdir -p /var/spool/mail cd /var/spool/mail
The parent option can save some time.