Home  >  Article  >  System Tutorial  >  Where is the command to create a new folder in Linux system?

Where is the command to create a new folder in Linux system?

下次还敢
下次还敢Original
2024-04-12 11:42:15683browse

The command to create a new folder in Linux system is mkdir. To create a folder using mkdir, open a terminal window and enter mkdir folder_name (where folder_name is the name of the folder to be created); you can use options to customize the creation process, for example: -p: Create a non-existent parent folder -v: Display the detailed information of the created folder -m: Set the permissions of the folder

Where is the command to create a new folder in Linux system?

Linux system command to create a new folder

In Linux systems, the command used to create a new folder is mkdir.

Create a folder using mkdir

To create a folder using mkdir, follow these steps:

  1. Open a terminal window.
  2. Type the following command, where "folder_name" is the name of the folder to be created:
<code>mkdir folder_name</code>

For example, to create a folder named "New Folder", execute the following command :

<code>mkdir New Folder</code>

Creating folders using options

The mkdir command also provides some options to customize the folder creation process:

  • -p: Create a non-existent parent folder.
  • -v: Display the details of the created folder.
  • -m: Set the permissions of the folder.

For example, to create a folder named "New Folder" within its parent folder "Documents", use the following command:

<code>mkdir -p Documents/New Folder</code>

To create a folder named " New Folder" folder and set its permissions to 755, please use the following command:

<code>mkdir -m 755 New Folder</code>

Example

The following are some files created using the mkdir command in Linux systems Example of a folder:

  • Create a folder named "Documents":
<code>mkdir Documents</code>
  • Create a folder named "Music" and set its permissions to 777 Folder:
<code>mkdir -m 777 Music</code>
  • Create a folder named "Videos" and in its parent folder "Media":
<code>mkdir -p Media/Videos</code>

The above is the detailed content of Where is the command to create a new folder in Linux system?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn