Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 1
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
3. Using Linux commands
  


mkdir page 9 of 15


Let's take a quick look at the mkdir command, which can be used to create new directories. The following example creates three new directories, tic, tac, and toe, all under /tmp:


$ cd /tmp
$ mkdir tic tac toe

By default, the mkdir command doesn't create parent directories for you; the entire path up to the next-to-last element needs to exist. So, if you want to create the directories won/der/ful, you'd need to issue three separate mkdir commands:


$ mkdir won/der/ful
mkdir: cannot create directory `won/der/ful': No such file or directory
$ mkdir won
$ mkdir won/der
$ mkdir won/der/ful

Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact