First, the directory structure of the Linux system
1. root directory (/): The top-level directory, the only partition in some systems.
2./bin Command file directory: Binary executable file containing Linux commands.
3./boot directory: The kernel files and boot loader files that store the system.
4./dev Device file directory: the corresponding file that holds the device (disk drive, terminal, optical drive, and network card) connected to the computer.
5./etc Directory: Stores most of the system's configuration files and subdirectories.
6./home directory: Contains the home directory for each user in the system.
7./lib Directory: Store a variety of programming language libraries.
8./lost+found Directory: The location of fragmented files when the system is crashing, which can be repaired by hand.
9./opt directory: Where packages are installed, some third-party applications are typically installed in this directory.
10./root Directory: The system administrator's home directory.
11./USR Directory: Store Some infrequently changing data, as well as the application directory installed under the system.
12./MNT directory: Used to temporarily mount the file system, providing default mount points for some devices.
13./proc Directory: A virtual file system in which the file is an in-memory image. You can view the files in this directory for more information about the system hardware running.
14./sbin Directory: Save the system administrator or root user's command file. /usr/sbin stores the application software,/usr/local/sbin commands that store common root user rights.
15./tmp directory: Holds temporary files, all files of this directory will be deleted periodically. (Try to build the test file in this directory during the learning process.)
16./var directory: Save frequently changing content in the system. such as system logs, mail files, and so on.
Ii. Directory Management Commands
1.ls column directory command: LS [options] [directory or file name]
Common options:-a Lists all files under this directory, including hidden files.
-l Displays the file details in a long format.
-M displays a list of files in a comma-delimited manner.
-R recursively displays the files in each subdirectory of the specified directory.
-I displays the index node number of the file in the first column of the output.
-r: Sorts and outputs a list of directory contents in reverse order of file names.
-S: Sorts and outputs a list of directory contents in descending order of file size. (-SL/-SLR)
-T: Sort by time and output. (-T/-RT)
2.CD changing the current working Directory command: CD [directory name]
Common commands: CD. Move up one level of directory
CD/HOME/A move to the specified directory
The CD is moved to its home directory
3.mkdir Create directory command: mkdir [options] [directory name]
Common options: Mkdir-p a/b/c generates a, B, c three directories recursively under the current directory.
MkDir a B generates both A and B two directories under the current directory.
Linux commands (ii)--directory and file management commands