Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17848

Detecting end of file creation/write operation (Linux shell)

$
0
0

Is there an easy way (using bash scripting) to detect when write operations to a file has been completed and/or when no other process is accessing the file? The reason for this is that I want to move the file to another folder only when the write operation is over.

I'm a newbie with shell programming, the best I could come up with is using md5sum to compare the result at different intervals. There must be an easier way...

submitted by notdam
[link][4 comments]

Viewing all articles
Browse latest Browse all 17848