Linux file hidden attribute

chattr can set the hidden attribute file / directory is useful in some scenarios

  • A: That Atime, tell the system not to modify the last access time to the file.
  • S: That Sync, once the application performs write operations on the file, the system immediately modify the results written to disk.
  • a: That Append Only, the system only allows additional data after the file is not allowed to cover any process or truncate the file. If the directory has this attribute, the system will only allow the establishment in this directory and modify files, not delete any files.
  • b: do not update the last access time of the file or directory.
  • c: to store the file or directory compression.
  • d: when the dump program is executed, the dump file or directory is not backed up.
  • D: Check the compressed file errors.
  • i: That Immutable, the system does not allow this document to make any changes. If the directory has this attribute, then any process can only modify the files under a directory, not allowed to create and delete files.
  • s: delete the file completely unrecoverable, because it is removed from the disk, and then filling the area where the file zero.
  • u: When an application request to delete the file, the system will retain its data blocks in order to later be able to restore the deleted file, to prevent accidental deletion of a file or directory.
  • t: file system supports tail merging (tail-merging).
  • X: direct access to the contents of compressed files.

parameter

  • -R recursive processing, all files and subdirectories in the specified directory dealt with together.
  • -v <version number> settings file or directory versions.
  • -V display process execution instruction.
  • + <Properties> Properties to open the file or directory.
  • - <property> to close the file or directory attributes.
  • = <Attributes> Specify the file or directory attributes.

Guess you like

Origin www.cnblogs.com/julysunshine/p/11600920.html