Create a folder (mkdir) command in linux

Source: Internet
Author: User

In linux, the command for creating folders (directories) is mkdir. The mkdir command can create folders (directories) and set the permissions for folders (directories) at the same time, the following describes how to use mkdir and provides an example.

Syntax:

Mkdir
[-P]-p or -- parents indicates that if the upper-level directory of the directory to be created is not created, the upper-level directory will be created together.
[-- Help]
[-- Version]
[-M <Directory attribute>] [directory name]-m <Directory attribute> or -- mode <Directory attribute> indicates that the directory permission is set when the directory is created.

Example:

Mkdir aaa create the aaa directory in the current directory

Mkdir-p/home/www/aaa create aaa directory. If the home/www directory path does not exist

Mkdir-m 777 aaa create the aaa directory in the current directory and set it to readable, writable, and executable.

Note: If you are prompted that you do not have the permission to create an instance, use the sudo command to escalate the permission and create the instance.

Articles you may be interested in
  • Delete files in linux. Detailed explanation of the rm command for folder commands
  • Linux File Creation (touch) command details
  • Linux chmod (file or folder permission setting) command parameters and Usage Details
  • How many lines of files can be viewed in linux?
  • Linux File Content statistics command wc command usage details
  • Summary of linux Command for viewing File Content
  • Prohibit web page right-click, copy, save as, View Source file and other functions to implement web page source code protection
  • Use SecureCRT to upload and download files (using sz and rz commands)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.