MkDir is used to create one or more directories
mkdir [command switch] Directory
|-M||Text directory set operation permissions|
|-P||If the parent directory does not exist, create them at the same time.|
|-V||Output information for each directory created by|
The above command creates the directory ' test '.
To create a directory and set access permissions:
Mkdir-m 666 Test
The above command creates the directory ' test ' and sets read and write permissions.
The rmdir command is used to delete/remove directories and their subdirectories.
rmdir [command switch ...] directory name
|-P||Allows the user to delete the dirname directory and delete it if the directory's upper-level directory has become an empty directory.|
Deletes/removes a directory.
If the TMP directory is an empty directory, the rmdir command removes/deletes the TMP directory.
To delete a directory tree:
This command recursively deletes the contents of all subdirectories under the TMP directory, prompting you for deletion of each file, and then deleting the TMP directory itself.
The CD command is used to change the directory.
cd [Directory name | ~ |./| / | - ]
|-L||Use a tree-type directory structure.|
|-P||The mandatory signature connection.|
CD linux-Command This command (linux-command) changes from its parent directory to the subdirectory.
Cd.. This will change from the current working directory/subdirectory to the parent directory.
CD ~ This command will change to the user's home directory "/home/username"
pwd– displays the working directory. The PWD command displays the absolute path name of the current working directory.
PWD [command switch]
|-P||Displays a pathname that does not contain a symbolic connection.|
|-L||Displays the path name that contains the symbolic connection.|
Displays the current working directory.
PWD If you work in the home directory, then the PWD command displays the current working directory as/home.
ls command files and directories in the current working directory.
LS [command switch] ... File
Displays the contents of the root directory:
LS/lists the contents of the root directory.
Show hidden files and directories:
LS-A lists all items, including hidden files and directories.
Display node Information:
The above command displays the file name and file size.