mkdir

How nice it would be to have a command to make a directory any time you wish. You could then use this command to create directories and thereby organize your files in multiple directories in a way similar to organizing files in a filing cabinet. The mkdir command allows you to do just that - make a directory.

This is an incredibly simple command. You specify the name of the directory to create. In the following example, we'll look at the contents of a directory with the ls command, use mkdir to make the directory named default.permissions, and then perform another ls to see the new directory:

$ ls -l
total 2
drwxr-xr-x   2 denise   users       1024 Oct 31 11:27 krsort.dir.old
$ mkdir default.permissions
$ ls -l total 4 drwxr-xr-x 2 denise users ...

Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.