Based on Marco Linux primary video 2-3
1. The first level directory under the root file
#ls/
1./boot
The system launches the related file. such as kernel, INITRD (initialization run directory)
2./dev
Device files: Includes block device (random access), character device (linear access, in characters), device number (main device number and secondary device number)
3./etc
Configuration file
4./Home
User's home directory, default is/home/username
My idea is that since it's home, then this contains all the user information, such as the concept of Windows user
5./root
Root user's home directory, special
6./lib
library files and kernel module files
The so-called kernel module file is/lib/modules, library files have static libraries and dynamic libraries, where the static library is the program sharing, dynamic library is. So (. dll in Windows)
7./media
Mount point directory, media for mounting mobile devices
#ls/dev/cdrom is the entrance.
#ls/media is a mount point
Note that the/mnt is the mount point directory, and the additional temporary file system
8./opt
Options optional directory, installation directory for early third-party programs
9./proc
Pseudo file system, the boot is not empty, but after the shutdown is empty. It's actually the kernel mapping file.
Ten./sys
Pseudo file system, property mapping file related to hardware device, also empty after shutdown
One./tmp
Temporary files, not in one months, will be automatically deleted,
./var
Changeable files that will grow as the system runs
/bin.
Binary binaries, executable files, user files, start-up use, runtime may use/etc and/lib
/sbin.
Manage commands
./usr
Universal shared read-only Global share read-only file
The following three are available after starting to provide normal basic functionality
/usr/bin
/usr/sbin
/usr/lib
The following three directories are the third-party software installation directory, which is not related to the system startup operation
/usr/lobal/bin
/usr/lobal/sbin
/usr/lobal/lib
2. Naming rules for files
1. Length cannot exceed 255 characters
2. Cannot be used/when file name
3. Case-sensitive
3. File management, directory management, operation management, equipment management, software management, process management, network management
4. Create a Directory
mkdir: Creating an empty Directory
The last point of the file is the one you want to create
#mkdir XX
The tree command can be used to see its directory structure, but this tree should be an external command, and there are two ways to make it work, if the server is in the list of Red Hat patch update servers, this needs to be purchased. Another way is to configure the Yum library before you can install it. Let's put the problem here first.
This link is a process for installing the tree, which you can refer to. http://www.178linux.com/13408
-P Parent Directory
It means that if the parent directory is not, mkdir can only be created, if there is a-p command, you can automatically create the parent directory.
-V Verbose More information
Curly braces unfold
5. Deleting a directory
RmDir (remove directory)
-P means that if you delete a subdirectory, it will always be deleted if it's parent directory is already a parent directory, and you know that there are other subdirectories underneath that parent.
Remember, when you delete, the directory must be written to the subdirectory, if only write to the parent directory, it will certainly be wrong.
6. Creation of files
# Touch File name
Under Linux, the directory and the file cannot have the same name, because the directory is the file, in fact, Windows is not allowed, but it has a suffix.
The main purpose of touch is to change the timestamp, but the file does not exist, so it defaults to creating a
7. deleting files
Rm
-F Force Delete
-R Delete the directory, this thing how to use is not particularly clear, but there is a –fr/, this one to be careful use. Because it can delete the system disk.
2-2 Linux Root File system detailed