Statetcpasswd to view the file information, the field Accesstime (access time) file data is updated after each read, the field
Stat/etc/passwd to view the file information,
The field Access time (Access time) file data is updated after each read,
The field Chage time (change time) file inode information is updated after each change
The field Modify time (modification time) file data is updated after each change.
Ls-l/etc/passwd
-Rwx ------. root 1704 January 10 08:44/etc/passwd
I:
. Point indicates that the file has a seliunx flag. only a specific process with the same flag can use the file.
Ls-Z/etc/passwd to view hidden flag.
Linux uses device files to operate hardware. the device files/dev/sda1 have
Brwx ------ 1 root disk 8, January 11 08:01/dev/sda1
8 indicates the master device number and identifies the device type.
1 indicates the next device number, indicating the partition number
In linux, the primary and secondary device numbers are used to identify various hardware resources. you can run the mknod command to create device files.
Format: mknod/mydisk B 8 3
2. run the blkid command to view the UUID and signature of all partitions.
Run the lsblk command to view information about each partition.
Run the tune2fs-L label/dev/sda1 command to modify the partition label name.
III. disk quota
Use the quota command to implement disk quotas,
Step 1: Add quota support, usrquota, and kgquota to the mount option bar of/etc/fstab.
Step 2: quotacheck-avug/dev/sdb2-a indicates that all-v indicates that the displayed details-u indicates that user-g is the group. After Execution, two data files are automatically generated in the quota partition, one for the quota of a single user and the other for the group quota.
Step 3: Use quotaon-ugv/mail to enable user and group quotas. Quotaoff-ugv/mail disable the quota function.
Edit the quota color settings for users and group accounts
Edquota-u username: edit user quota
Edquota-g groupname: quota of the editing group.
Quota table fields
Filesystem blocks soft hard inode soft hard
/Dev/sdb1 0 10 80 0 23 29
The disk quota can be limited in two aspects: the block size and the number of files.
The soft field indicates the soft limit. if the limit is exceeded, a warning is issued.
Hard field indicates a hard limit, which cannot be exceeded
The blocks field only specifies the number of blocks currently used. inode indicates the number of blocks currently used,
We only need to modify the soft and hard values to limit the quota. the unit of block is k,
Quota directly using commands
Setquota-u username (blocks) soft (blocks) hard/dev/sdb2
Replication quota: new user of the edquota-p template. Implement automatic quota.