Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Read, SFTP Put and Move Files from a "Busy" NFS FileSystem

by salva (Canon)
on Jan 12, 2019 at 15:14 UTC ( [id://1228423]=note: print w/replies, xml ) Need Help??


in reply to Read, SFTP Put and Move Files from a "Busy" NFS FileSystem

If you have control of the program writing the XML files, the best approach is to make it write each one to a temporary file location and once all the data has been written, move it to its final destination location. In that way you are never going to find an incomplete .xml on the filesystem.

Another thing you can do is to check the file contents. Incomplete XML files are easy to detect, you can use an XML parser or just read the first XML tag in the file and then check that the last bytes of the file are the corresponding closing tag.

  • Comment on Re: Read, SFTP Put and Move Files from a "Busy" NFS FileSystem

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-25 09:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found