Search code examples
bashdirectorymv

Performing a move (mv) on a folder which has a process running from it


I have a web server (PlayFramework/Netty based) running from a particular app folder. I did a quick test and everything worked fine. The server was able to handle all web requests as normal. But I'm hesitant to call to it safe.

Could someone explain why it might or might not be safe to do this?


Solution

  • It is not safe to do this. Processes that are already running will already have files open and will be able to access them from disk, but if any processes are HUP'd or restarted they won't be able to find the files in that folder.