1. The Dev directory role
DEV is the acronym for Devices. Here the main storage device, CD-ROM, hard disk (under Linux, all files).
2. tmp directory Permissions
The permissions for the/tmp directory are 1777, the last one for other users is t, the sticky bit (sticky), is the special permission in Linux, the corresponding number is 1, meaning in the/tmp directory, only the owner or root of the file can delete or move the file.
3. Tar Command Summary
-Z: compression via zip tool;
-C: (create) creates a compressed package;
-V: (verbose) shows the execution process;
-F: (file) The name of the compressed package;
-T: (list) Displays the contents of the compressed package;
-X: (extract) extracts files from the package.
4. RAID0 RAID1 RAID5 RAID10 Advantages and disadvantages and application scenarios
RAID 0: Split the contiguous data into blocks, scattering the data block's read/write requests to each disk to achieve "simultaneous" read/write purposes.
Minimum disk requirements: 1 blocks
Advantages: The highest utilization rate, 100%, the fastest read and write.
Cons: Unable to back up data, once an error occurs, all data is lost.
Application scenario: Suitable for large-scale concurrent read and write, but the data security requirements are not high, such as MySQL slave (data block from the library), cluster node RS (waiter)
RAID 1: Maximum availability and repair of user data is guaranteed.
It's only 2 disks.
Advantage: Write two disks at the same time for full data backup.
Cons: Lowest utilization, 50%, slow read and write speed.
Scenario: A business that applies to data that is important and uninterrupted.
Compromise of RAID 5:raid 0 and RAID 1.
3 disks or more, utilization is (n-1)/n*100% (n≥3)
Pros: Allows error to occur, data security is lower than RAID 1, disk space utilization is higher than RAID 1
Disadvantage: Only one disk can be allowed to be lost, write performance is not high
Application scenario: MySQL master-slave library can be, storage can also, ordinary server in order to reduce maintenance costs, but also maintain a certain degree of redundancy and read performance can do RAID 5
RAID 10: Also known as RAID 1+0, is a combination of RAID 1 and RAID 0 standards, first by RAID 0 divided into two groups, and then the two groups by RAID 1 mirroring
4 Disks, Utilization 50%
Advantages: Read and write fast, can fault-tolerant, can back up data
Cons: High cost
Application scenario: For applications that require high performance, high fault tolerance, but small capacity requirements, not bad for money
5. AWK Countdown second column awk How to say
awk ' Nr==3{print $ (NF-1)} '
Where $NF represents the last column, the penultimate list is-1, the third column is 2, and so on, and the Countdown nth column (n-1)
A summary of the first phase of Linux learning