Moving files with 'mv' still leaves files behind: Should I use rsync instead

I am using the command mv to move files and directories from one mounted drive to another mounted drive.


mv -v /storage/storage1/* /storage/storage7/

It took a while to move 6TB of data over to my new 20TB harddrive.
When it was finished I noticed that the old harddrive still had some directories and files left. Not everything got “deleted”. I had turned on verbose so I could see that ‘mv’ did first copy then remove.

So I decided to run diff -r /storage/storage2 /storage/storage1, to see if there was a difference between the files that was left on the old harddrive, and the ones that got copied to the new harddrive. One video file did differ.

I don’t want to do the diff again for the rest I need to copy. The diff has been running for almost 12 hours and not yet finished.

Is using rsync a better option to move files from one harddrive to another? I want to preserve everything about the files and every metadata about them.

The “*” does not match all files, which might be why some were left.

Personally, I use “rsync” for copying. But only you can decide what is best for you.

It is storage2 in one case and storage7 in another case.

It was an error.
It should be:

mv -v /storage/storage1/* /storage/storage8/
diff -r /storage/storage1 /storage/storage8

I have 8 harddrives. I was moving from one of the old ones to my new 20TB harddrive.

For the rest of the old harddrives I will now use the rsync with these options.

rsync --verbose --recursive --human-readable --progress --executability \
--acls --xattrs --perms --owner --group --times --devices --specials --links \
--remove-source-files /storage/storage2 /storage/storage8

When I am running rsync now from the /storage/storage1 drive, on the files that was left behind, I got some errors.

Warning PATH/TO/FILE failed verification - update discarded (will try again)
rsync read errors mapping "/storage/storage1/PATH/TO/FILE" Input/Output error (5)

I just hope the files I copied yesterday, that reside on the new harddrive really are OK.
Perhaps I need to run some filecheck tool on them. Worst case, they are gone, least worst case I have to “download” them again (if available).

Now I really wish I had backups.