Hi, ** Can someone tell me how to detect if a file exists using bash?
I need to check for the file periodically (via cron) and if it disappears, copy a backup of the file to replace it. I have a client with a dedicated server where a very important configuration file keeps disappearing for no explainable reason. So we need a script to regularly check every that the file is there and replace it when it disappears so that his web site services keep running. As to why it's disappearing...no idea. I'm starting to suspect it may be malicious code that a previous programmer installed to delete the config file so he would pick up the "maintenance" work. I've had a good look around but haven't found anything yet. Which leads to a second question: ** Is there any way to monitor a file and log which processes or scripts access and / or modify it? Thanks!
