In Unix, how do I create a new directory?
To create a subdirectory in the home directory of your Unix
account, use the
mkdir command. For example, to create a
work, at the Unix prompt from within
your home directory, enter:
mkdir command requires at least one argument and will take
multiple arguments. To create three directories named
mkdir work programs reports
If you're currently in your home directory and you want to make a new
directory in another directory, you don't need to use the
command first. You may specify a pathname with the
command, for example:
mkdir command in conjunction with the
-p option creates the directories specified in a
path. This is very useful when you want to make a directory structure that
is several directories deep, and none of the subdirectories exist yet. For
example, the following command will create the
mkdir -p work/programs/reports/completed
-p option, this command would have
returned an error.
For more information on the
mkdir command, see the online
manual. At the Unix shell prompt, enter:
At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?
This is document abng in the Knowledge Base.
Last modified on 2008-08-22 00:00:00.
- Fill out this form to submit your issue to the UITS Support Center.
- Please note that you must be affiliated with Indiana University to receive support.
- All fields are required.