How Do I Create a Subdirectory in Unix?
Contents

How do I create a subdirectory in Linux?

To create a new directory with multiple subdirectories you only need to type the following command at the prompt and press Enter (obviously, change the directory names to what you want). The -p flag tells the mkdir command to create the main directory first if it doesn’t already exist (htg, in our case).

How do you subdirectory in UNIX?

In order to access a file in a subdirectory of the current directory, one can either change to that directory or use a partial path name that would look like subdirectory/filename. The ls (list) command is used to display the names of the files and subdirectories in the current directory.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest