Posts

Best practice to continue mv

Image
13 2 I used the terminal to copy files from one drive to another. sudo mv -vi /location/to/drive1/ /location/to/drive2/ However that suddenly stopped, while some hours into it, and without an error, after creating a directory. My own solution to that is often a mix of hashing and comparing which is mostly a time consuming mess as I now have to recover from an intermediate copy without really knowing which files are missing (written as very long one-liner for zsh — note that this script doesn't work in bash as written): source_directory="/path/to/source_directory/"; target_directory="/path/to/target_directory/"; while read hash_and_file; do { echo "${hash_and_file}" | read hash file; echo "${file}" | sed "s/^/${source_directory}/g" | read copy_from...