Home > System Tutorial > LINUX > body text

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

下次还敢
Release: 2024-04-12 11:42:15
Original
667 people have browsed it

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>
Copy after login

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

<code>mkdir New Folder</code>
Copy after login

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>
Copy after login

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>
Copy after login

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>
Copy after login
  • Create a folder named "Music" and set its permissions to 777 Folder:
<code>mkdir -m 777 Music</code>
Copy after login
  • Create a folder named "Videos" and in its parent folder "Media":
<code>mkdir -p Media/Videos</code>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!