user533020 Asked: 2012-03-10 14:32:08 +0800 CST2012-03-10 14:32:08 +0800 CST 2012-03-10 14:32:08 +0800 CST *nix behavor, when overwriting a file that's open by another process using mv 772 Will the other process be able to finish reading the old file even though it's been replaced? nix mv overwrite 2 Answers Voted user9517 2012-03-10T14:41:18+08:002012-03-10T14:41:18+08:00 Yes, the process with the file open will be reading the file via an open file descriptor. The mv command just changes the associated directory entry. Best Answer Zoredache 2012-03-10T14:39:26+08:002012-03-10T14:39:26+08:00 If the other process keeps the file open the entire time, then yes it should be able to continue reading. Just like you can delete an open file, and processes that file open will still be able to read/write from the file, until it closes.
Yes, the process with the file open will be reading the file via an open file descriptor. The mv command just changes the associated directory entry.
If the other process keeps the file open the entire time, then yes it should be able to continue reading.
Just like you can delete an open file, and processes that file open will still be able to read/write from the file, until it closes.