Developer's Daily Unix by Example
  main | java | perl | unix | DevDirectory
   
Main
Unix
Education
Unix by Example
   

 

Command mkdir
Description The "mkdir" command is used to create new directories (sub-directories).
Examples mkdir tmp

This command creates a new directory named "tmp" in your current directory. (This example assumes that you have the proper permissions to create a new sub-directory in your current working directory.)

mkdir memos letters e-mail

This command creates three new sub-directories (memos, letters, and e-mail) in the current directory.

mkdir /usr/fred/tmp

This command creates a new directory named "tmp" in the directory "/usr/fred". "tmp" is now a sub-directory of "/usr/fred". (This example assumes that you have the proper permissions to create a new directory in /usr/fred.)

mkdir -p /home/joe/customer/acme

This command creates a new directory named /home/joe/customer/acme, and creates any intermediate directories that are needed. If only /home/joe existed to begin with, then the directory "customer" is created, and the directory "acme" is created inside of customer.

 


What's related

copyright 1998-2007, devdaily.com, all rights reserved.
devdaily.com, an alvin j. alexander production.