In Ubuntu if a file /A/largefile.foo is moved via 'cp' or 'mv' to /B/largefile.foo, how can I ensure that the entire file is written before attempting to move the file a second time to /C/largefile.foo?
Case: 1. An remote automated Script X begins an rsync to destination folder A of a very large file. 2. A cron job on the local machine hourly moves files from folder A to folder B, but I do not want to copy partial files (I only want files that have finished uploading completely)
Case: 1. A cron job periodically moves files from folder B to folder C, but I do not want to copy partial files (I only want files that have finished uploading completely)
Note: I'm looking for a solution that does not require the addition of pid files