From: dragonyy Date: 2009-04-28T18:30:32+09:00 Subject: Re: How Check File Busy? On 4月28日, 下午5時17分, Robert Klemme wrote: > > IMHO it's difficult to detect that. You could use shell utility > "fuser" if available on your platform. In a shell script you could do > > while fuser "$file" >/dev/null; do > sleep 1 > done > cp "$file" "$somewhere_else" > > Maybe you can use an FTP server which allows to trigger post > processing after an upload has finished. I am not sure about FTP > library, but if it contains a server part you might even be able to > cook one yourself. > > Kind regards > > robert > > -- > remember.guy do |as, often| as.you_can - without endhttp://blog.rubybestpractices.com/ Once I had the same problem transmitting by SSH, and then I used an external tool 'lsof' to report those processes opening the target files. Maybe you can do this way. Though sometimes lsof is really slow to return. regards dragon