Eight BSD flags are available in APFS to lock files, hide them, and restrict them in other ways. None of them synced correctly in iCloud Drive, and four caused other problems.
chflags
How to use the Finder’s Lock feature, and as the Immutable flag in Terminal. What its effects are, and how well it’s retained. How iCloud Drive can’t cope with it, and how you can use it in your own lightweight versioning system.
How to prefix a file or folder name with a . to hide it, how to use chflags, and how they differ. And what are all those .DS_Store and ._ files doing?
How can I clean up my Documents folder?
