Common Command Parameters
A: Atime, tell the system not to modify the last access time for this file. S: That is, sync, once the application writes to the file, the system immediately writes the result of the modification to the disk. A: Append only, the system only allows appending data after this file, and does not allow any process to overwrite or truncate the file. If the directory has this attribute, the system will only allow the file to be created and modified in this directory, and no files are allowed to be deleted. B: Do not update the last access time of the file or directory. C: Compress the file or directory and store it. D: When the dump program executes, the file or directory will not be backed up by dump. D: Check for errors in the compressed file. I: That is immutable, the system does not allow any modification to this file. If the directory has this attribute, then any process can only modify files under the directory, not allow the creation and deletion of files. S: Delete the file completely, not recoverable, because it is deleted from disk, and then fills the area with 0 files. U: When an application requests the deletion of this file, the system retains its data block so that it can be recovered later to delete the file, to prevent accidental deletion of files or directories. T: The file system supports tail merge (tail-merging). X: The contents of the compressed file can be accessed directly.
Common Command Display
Chatter: Lock files, cannot be deleted, cannot change
+a: can only add content to files, but cannot be deleted.
chattr +a /etc/passwd
-d: cannot be deleted
Locking: Chattr +i /etc/passwd file cannot be deleted, cannot be changed, cannot be moved
View Lock: lsattr/etc/passwd file Adds a parameter I means lock
Unlock: chattr-i/home/omc/h.txt -means release
Hide chattr command:
Which chattrmv/usr/bin/chattr /opt/ftl/cd/opt/ftl/ mv chattr H -To change command, use alias h to hide identity/opt/ftl/h +i/home/ Omc/h.txt-- Drive chattr command with H
Lsattr/home/omc/h.txt-- View encryption information
Recover hidden commands
Linux chattr Command Detailed