Linux system management _2.1 switch, create and delete directories _cd_mkdir_rmdir

 

Usage: cd [directory path]

Change the working directory to the specified directory path, if the [Directory Path] parameter is omitted, it will be changed to the user's home directory, where [Directory Path] can be an absolute path or a relative path

In addition, "~" indicates the current user's home directory in Bash, "." indicates the current directory, ".." indicates the upper level of the current directory, and "-" indicates the directory before the jump.

Example :

Jump to /usr/bin/ : cd /usr/bin

Go back to the previous directory: cd -

Jump two levels above the current directory: cd ../..

 

Usage: mkdir [options]... directory...

Creates the directory if the specified directory does not exist.

 -m, --mode=mode set permission mode (similar to chmod command)

 -p creates directories above the target directory if needed, but does not treat as an error even if these directories already exist

 

Usage: rmdir[options]... directory...

Creates the directory if the specified directory does not exist.

 -m, --mode=mode set permission mode (similar to chmod command)

 -p creates directories above the target directory if needed, but does not treat as an error even if these directories already exist

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325022005&siteId=291194637