The mkdir of common Linux commands

Source: Internet
Author: User
Tags syslog

mkdir: Creating an empty Directory


1. Command format

mkdir [Options] directory ...

2. Command function

Creates an empty directory at the specified location, the command must have writable permissions, and cannot create a directory with a name that already exists.

3. Command Parameters

-P: Recursive creation of empty directories

-V: Displays information to create an empty directory

4. Command instances

Example 1: Creating an empty directory

[Email protected] ~]# mkdir ABC

[[email protected] ~]# ls

ABC Anaconda-ks.cfg Desktop Install.log install.log.syslog

Example 2: Creating a directory recursively

[Email protected] ~]# MKDIR/ROOT/AA/BB/CC

Mkdir:cannot Create directory '/ROOT/AA/BB/CC ': No such file or directory

[Email protected] ~]# mkdir-p/root/aa/bb/cc

[Email protected] ~]# Ls-r

.:

AA ABC anaconda-ks.cfg Desktop install.log install.log.syslog


./AA:

Bb


./aa/bb:

Cc


./AA/BB/CC:


./ABC:


./desktop:

home.desktop system.desktop trash.desktop            

Example 3: Displaying information to create an empty directory

[Email protected] ~]# mkdir-v GG

mkdir:created directory ' GG '

             


This article is from the "cold-blooded Killer" blog, please be sure to keep this source http://deathkiller.blog.51cto.com/9130248/1592303

The mkdir of common Linux 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.