lsattr chattr
时间: 2024-06-03 10:08:00 浏览: 141
lsattr and chattr are two Linux commands used to manage file attributes.
lsattr: This command is used to list file attributes on Linux file systems. It displays the attributes of a file or directory, including read-only, immutable, append-only, and no-delete. It is commonly used to check if a file or directory is protected against modifications or deletion.
chattr: This command is used to change file attributes on Linux file systems. It allows users to set or remove attributes that control how a file or directory can be accessed or modified. Some common attributes that can be set with chattr include read-only, append-only, no-delete, and immutable. The chattr command is typically used by system administrators to protect important files from accidental or malicious modifications.
阅读全文