Why file is accessible after deleting in unix?

前端 未结 2 1267
情深已故
情深已故 2020-12-18 09:59

I thought about a concurrency issue (in Solaris), what happen if while reading someone tries to delete the same file. I have a query regarding file existenc

2条回答
  •  清酒与你
    2020-12-18 10:19

    I think your question has nothing to do with the difference between Windows/Linux. It's about how VI works.

    when using VI to edit a file. VI will create a .swp file. And the .swp file is what you are actually editing. At the same time, if other users delete the original file will not effect your editing. And when you type :w in VI, VI will use .swp file to overwrite the original file.

提交回复
热议问题