How to make a folder readable and writable but not delete in mac?

problem description

how do I make folders readable and writable but not delete in mac?

the platform version of the problem and what methods you have tried

mac system
I can use the chattr + a command to set the folder to read and write but not delete it, but on mac system, I don"t know what command or tool to use to achieve my goal. I use chattr + a under mac and report sudo: chattr: command not found

what result do you expect? What is the error message actually seen?

you can set folders on the mac system to be readable and writable, but you cannot delete

.
Sep.19,2021

chflags uunlnk dir
Menu