This blog post mainly describes the Linux system directory management commands, there are mkdir,rmdir,ls,cd,pwd,file,tree.
1, mkdir--Create a directory
Usage:
mkdir [Options] directory ...
Options
-M,--mode=mode: Define permissions for the directory
-P,--parents: When creating a directory, if the directory's parent directory does not exist, first create its parent directory, and then create subdirectories
-V,--verbose: Displays information for creating each directory
2, rmdir--Delete empty directory
Usage:
rmdir [options] directory ...
Options
-P,--parents: When you delete a subdirectory, if the subdirectory is deleted, the stepfather directory is also empty, and its parent directory is also deleted
# rmdir-p/A/B/C
-V,--verbose: Displays information to delete each directory
3, CD--switch directory, is an internal command
Usage: CD [-l|-p] [dir]
-L: Switch to the symbolic link directory when switching directories
-P: Switch to physical directory structure when switching directories
# CD Switch to/
# CD-Switch to the previous directory
# CD ~username switch to the user's home directory
4. PWD--Show Current working directory
Usage: pwd [-LP]
-l| P with CD
5. File--Displays the document type
Simple usage: File FILENAME ...
6. Tree--List directory tree
7. LS--List the directory context
-L: Long message
-H: Do unit conversions
-I: The index node of the file
-A: Show hidden files, including (. And ...)
.: Current Directory
.: Parent directory of current directory
-A: Shows hidden files, but does not include. and.
-R: Reverse Display
-R: Recursive display
-D: Display the directory's own properties
Linux_ Directory Management commands