The mkdir command is mainly used to create folders in the Linux operating system, and the created folders cannot be renamed. The following small series will introduce you to the usage of the mkdir command in Linux, so that you can understand.
1. Command format:
mkdir [options] directory. . .
2. Command function:
The mkdir command enables you to create a folder or directory named DirName (specified file name) in the specified location. The user who wants to create a folder or directory must have write access to the parent folder of the folder being created. Moreover, the created folder (directory) cannot be the same as the file name in the parent directory (that is, the parent folder), that is, the same directory cannot have the same name (case sensitive).
3. Command parameters:
-m, --mode= mode, set permissions "mode" (similar to chmod) instead of rwxrwxrwx minus umask
-p, --parents can be a path name. At this point, if some directories in the path do not exist yet, with this option, the system will automatically create those directories that do not exist yet, that is, you can create multiple directories at a time;
-v, -- Verbose displays information every time you create a new directory
--help Display this help and exit
--version to output version information and exit
4. Command example:
Instance 1: Create an empty directory
Command:
mkdir test1
Output:
[root@localhost Soft]# cd test
[root@localhost test]# mkdir test1
[root@localhost test]# ll
Total 4drwxr-xr-x 2 root root 4096 10-25 17:42 test1
[root@localhost test]#
Instance 2: Recursively create multiple directories
Command:
mkdir - p test2/test22
Output:
[root@localhost test]# mkdir -p test2/test22
[root@localhost test]# ll
Total 8drwxr-xr-x 2 root root 4096 10-25 17:42 test1
drwxr-xr-x 3 root root 4096 10-25 17:44 test2
[root@localhost Test]# cd test2/
[root@localhost test2]# ll
Total 4drwxr-xr-x 2 root root 4096 10-25 17:44 test22
[ Root@localhost test2]#
Previous 12 Total 2
In Linux, commands can be used to form dialog boxes. The dialog box formed by Linux command line is
Crunchbang system is a lightweight Linux desktop distribution. Crunchbang Linux is
If you want to upgrade the latest CentOS system, or the systems own update is not to force, you have
In the Linux system file structure, there is such a magical directory that is usr.
Steps to install StarDict software on Linux
CentOS 7 tips for resetting the root password
Linux system prompts mount unknown when mounting U disk
VMware clone Linux prompt eth0 can not find what to do?
Steps to install Brackets on Ubuntu
How to recover Ubuntu's Grub boot by UEFI?
Ubuntu install Nox, compile make error, what should I do?
How to use the assert function under linux system?
What should I do if I get an error when installing LDAP on Linux under Linux?
How to upgrade OpenSSH under Linux system?
How to manually add the missing boot.ini file to WinXP
Tips for uninstalling installed programs under Win8
What should I do if WinXP cannot access the Internet after opening Guest?
The latest version of Windows 8: Build 8156
Win8 method for querying Directx version information
Win7 open software prompt "Cannot find Msvcp50.dll" solution
Win8 prepares homework 13 features worth collecting
Linux command line in the network speed test method detailed