First, the development process of Linux
1. The world's first computer, born in 1946, was during the Second World War.
2, the Linux kernel version is composed of three parts, namely the main version number, minor version number, the minor version number.
The minor version number is the stable version with even numbers, and the odd is the test version.
Ii. Common commands for Linux
1, CD//switch working directory
2. CAT//View file contents
3. Touch//Create File
4, clear//clear screen
5, Echo//display a line of text content
6. History//View historical record
7. PWD//Displays the full path of the working directory
8. LS//List contents
9. CP//Copy files or directories
10. RM//delete files or directories
11. MV//Move and rename files
12. WHO//display information for all terminals
Third, Linux file management
1, file system files and directories are organized into a single inverted tree structure, the file system is started from the root directory, with "/" representation. File names are case-sensitive; files that begin with. are hidden files, and the paths are split with "/". The file has two types of data: metadata metadata, data.
2. File name rules
1) The file name is up to 255 bytes long, including the path, with a maximum of 4,095 bytes.
2) color can be used to distinguish files, directories, executables, compressed files, linked files, other files.
Blue--Catalog Green--Executable file red--Zip file light blue--Link file gray--Other files
3) All characters are valid except for slashes and nul. However, directory names and files that use special characters are deprecated, and some characters need to use quotation marks to refer to them.
4) standard Linux file system (e.g. EXT4), file name is case sensitive.
3. File types under Linux
1)-: General directory
2) d: catalog file
3) B: Block device
4) C: Character device
5) L: Symbolic Link file
6) P: Piping file pipe
7) S: Socket file socket
4. File wildcard character (partial)
1) match 0 or more characters
2)? Match any single character
3) ~ Current User Home Directory
4) ~mage User Mage home directory
5) Pre-~+ working directory
6) ~-Previous working directory
7) [0-9] Match number range
8) [A-z] Letter
9) [A-z] Letter
[Wang] matches any one of the characters in the list
[^wang] matches characters other than all characters in the list
5. Soft and hard connection of files
1) Hard links create hard links to add additional record entries to refer to the file, increase the number of links when creating a hard link, and each directory references the same inode number.
When deleting a file: RM command decrements the count of links, the file to exist, at least one link number, when the number of links is zero, the file is deleted;
Note:
cannot span drives or partitions
2) symbol (or soft) Link a symbolic link to another file; ls-l the name of the link and the referenced file; the content of a symbolic link is the name of the file it refers to, can be made to a directory, can be spanned, or a path to another file, the size of the path string to the length of the does not increase or decrease the reference count of the target file Indoe.
6. Input and output redirection and piping
1) > Correct output
2) 2> Error output
3) &> All output file does not exist when,> and >> can create a new file, the file already exists > means overwrite,>> represents append
4) 2>&1 turn the wrong result into the correct result
5) 1>&2 turns the right result into the wrong result
6) 2>&1 | or |& to pass all the results to pipeline processing
Linux Common Command and file management system