In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what is the function of Linux chattr command". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Common command parameters
A: Atime, which tells the system not to change the last access time to this file.
S: Sync, once the application performs a write operation on the file, the system immediately writes the modified results to disk.
A: Append Only, the system only allows data to be appended to this file, and no process is allowed to overwrite or truncate the file. If the directory has this property, the system will only allow files to be created and modified in this directory, not to delete any files.
B: the last access time of the file or directory is not updated.
C: compress the file or directory and store it.
D: when the dump program is executed, the file or directory will not be backed up by dump.
D: check for errors in the compressed file.
I: Immutable, the system does not allow any changes to this file. If the directory has this attribute, then any process can only modify the files under the directory and is not allowed to create and delete files.
S: delete the file completely and cannot be recovered because it is deleted from disk, and then populate the area where the file is located with 0.
U: when an application requests to delete the file, the system retains its data blocks so that the file can be deleted later to prevent accidental deletion of the file or directory.
T: the file system supports tail merge (tail-merging).
X: you can access the contents of the compressed file directly.
Display of commonly used commands
Chatter: locked files, cannot be deleted, cannot be changed
+ a: you can only add content to the file, but not delete it.
Chattr + a / etc/passwd
-d: cannot be deleted
Lock: chattr + I / etc/passwd files cannot be deleted, changed, or moved
View locking: the lsattr / etc/passwd file adds a parameter I for locking
Unlock: chattr-I / home/jiaxu/test.txt-means unlocked
Hide the chattr command: which chattr mv / usr/bin/chattr / opt/ftl/ cd / opt/ftl/ mv chattr h-- > change command Use alias h to hide identity / opt/ftl/h + I / home/jiaxu/test.txt-- > use h to drive chattr commands lsattr / home/jiaxu/test.txt-- > View encrypted information to restore hidden commands: mv h / usr/bin/chattr chattr-I / home/jiaxu/test.txt lsattr / home/jiaxu/test.txt "what is the purpose of the Linux chattr command" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.