next up previous contents
Next: Directory Removal Up: Basic Directory Commands Previous: Changing Directories

Creating Directories

The UNIX file system allows for the creation of subdirectories to help organize files according to purpose or similar function. To create a subdirectory, use the mkdir command:

mkdir <directoryname>

Issued without a path, mkdir creates a subdirectory of the current working directory. The command mkdir can be used to make a subdirectory anywhere in the directory tree by specifying a path before the directory name:

mkdir \( \sim \)/smalltalk/source/<directoryname>

Giving the mkdir command in this way assumes that you have already created the parent directories specified in the path. mkdir will return an error if any of the parent directories do not exist. If you wish mkdir to create all the directories in the tree that you specified, use the -p option.



World Wide Web Administrator
1/5/1999