|
From: | Hans Schou |
Subject: | Re: Processing files from a tar archive in parallel |
Date: | Tue, 29 Mar 2011 22:53:35 +0200 (CEST) |
User-agent: | Alpine 2.00 (DEB 1167 2008-08-23) |
On Tue, 29 Mar 2011, Jay Hacker wrote:
Hans, That is a great idea. However, can I be sure the file is completely written to disk before tar prints the filename?
You will tell us. Write a script which handle the job. Let it start like this: #!/bin/bash S1=$( stat -c %s $1 ) sleep 1 S2=$( stat -c %s $1 ) if [ $S1 != $S2 ]; then echo "Error, race condition. File not written. $S1 $S2" exit 1 fi /hans -- Horsebakken 78, DK-2400 København NV
[Prev in Thread] | Current Thread | [Next in Thread] |