in reply to Re: Unlinking a file when the file doesnt exist
in thread Unlinking a file when the file doesnt exist

A good reason for using this solution is that, in theory at least, you could have a possible race condition with your code. Between check for the existence of the file (-e) and deleting the file another process could have deleted it or even opened it.
  • Comment on Re^2: Unlinking a file when the file doesnt exist

Replies are listed 'Best First'.
Re^3: Unlinking a file when the file doesnt exist
by ikegami (Patriarch) on Mar 22, 2011 at 19:05 UTC
    It's not a race condition. It doesn't matter when the file was created or haw many times it was created. The file should be gone and it's not.