|
|
|
|
|
by esseph
2 days ago
|
|
> Just last week, I spent several hours reading the rsync C Language source code line-by-line so I could write a custom patch to add nanoseconds to the file creation dates. Pause I need to hear about this :) What is your use case, if you don't mind sharing? |
|
I have custom utilities that detects moved/renamed files by analyzing heuristics of filesize, modification times, and creation times. It can work with files' timestamps without any fractional seconds (nanoseconds) but the most reliable and confident heuristics takes advantage of nanoseconds to build the most accurate hashtable of files.
The latest rsync 3.4.4 will copy creation times but it didn't copy over the nanoseconds. It does copy the nanoseconds for file modification times but not the creation/birth times.
Command line file sync tools like rsync or robocopy can't detect file moves which means they will blindly delete files from the old spot and re-copy them to the new spot. Imagine a directory that's 2 terabytes full of files that were just renamed. Those utilities will delete 2 terabytes then recopy another 2 terabytes. It's a risk of losing 2 tb of files if there's a interruption and needless SSD wear & tear.
I may send my changes up to the rsync github repo. I just don't have an active account at the moment.