For example, say you have a daily job to upload new local files to a remote storage device. In this scenario, once the files are successfully uploaded to the remote storage device (that is also setup as a mounted volume), we want to remove them from the local device to free up space. This function would accept a directory /path/to/dirX and verify all files contained within dirX are in /path/different/branch/of/file/tree/dirY.
Not sure the best to accurate compare the dirX/fileA with dirY/fileA though. md5 seems really slow on larger files, and we aren't OVERLY concerned about accuracy. Maybe just verify the file size is the same in bytes?
For example, say you have a daily job to upload new local files to a remote storage device. In this scenario, once the files are successfully uploaded to the remote storage device (that is also setup as a mounted volume), we want to remove them from the local device to free up space. This function would accept a directory
/path/to/dirXand verify all files contained withindirXare in/path/different/branch/of/file/tree/dirY.Not sure the best to accurate compare the
dirX/fileAwithdirY/fileAthough. md5 seems really slow on larger files, and we aren't OVERLY concerned about accuracy. Maybe just verify the file size is the same in bytes?