Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: unlink fails to delete files with perculiar names

by DaveARoberts (Novice)
on Nov 23, 2011 at 13:43 UTC ( #939660=note: print w/ replies, xml ) Need Help??


in reply to Re^2: unlink fails to delete files with perculiar names
in thread unlink fails to delete files with perculiar names

Thinking more on this I think that you have touched on the source of the file (a temporary backup from an MS Office program - I have excel, word and powerpoint examples). If I try to delete a file using unlink with the application still open it complains (Permission denied).

The code snippet is from a file replication utility. I think what has happened is that an oen file has been replicated, the original destroyed by the creating application, and then replaced by a subsequent replication event.

The preventative cure is to prohibit the copy of a file with the pattern "/~$" in its path/name. The curative solution may be to delete any directory containing files with this pattern - and recreate what I want from a backup


Comment on Re^3: unlink fails to delete files with perculiar names

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939660]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2014-12-21 10:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls