I would like to prevent one of my root processes from deleting a certain file. So I came across the flock command, it seems to fit my need, but I didn\'t get its syntax.
flock is not the right tool for this job. If you have a programme that is deleting files, you should not run that programme as root. You should run it as a different user. Unix has very good support for file permissions, but root is a god account. Root can do everything, and there are no permissions for root.