In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to use the chattr command in Linux. It is very detailed and has a certain reference value. Friends who are interested must finish it!
Linux commonly used command chattr is used to change file properties. This directive alters the file or directory properties stored on the ext2 file system, which have the following eight modes.
Chattr is used to change file properties
Syntax chattr (option) option a: make the file or directory for additional purposes only; b: do not update the last access time of the file or directory; c: store the file or directory after compression; d: exclude the file or directory from the dumping operation; I: do not change the file or directory; s: delete the file or directory secretly; S: update the file or directory immediately; u: prevent accidental deletion. -R: recursive processing, all files and subdirectories under the instruction directory are processed together;-v: set the file or directory version;-V: display the instruction execution process; +: open the attribute of the file or directory; -: close the attribute of the file or directory; =: specify the attribute of the file or directory. An example uses the chattr command to prevent a key file in the system from being modified:
Chattr + I / etc/fstab then try rm, mv, rename and other commands to operate on the file, all to get the result of Operation not permitted.
Let a file only append content to it, not delete it. Some log files are suitable for this operation:
Chattr + a / data1/user_act.log above is all the content of this article "how to use chattr commands in Linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.