I have accidentally deleted part of folder (before stopping the rm command). However, the backup I restored was around 2 weeks old, and unfortunately, I've renamed and restructured the directories between deleting them and the point in time of the backup. I have manually restored what I know was missing, but I'm not sure I managed to catch everything.
Is there a fast method of showing file differences that do not include their parent directories, only file name and modification or creation date? For example, I have the directories
data/output/test1/file1.mha
which I might have moved/renamed to
data/results/mhas/first_test/file1.mha
Using diff -rq
did not work for this and is also rather slow. The directory has a size of around 2TB and a fairly large number of files, so checking the MD5 of every files is barely an option.
To clarify a little bit, after restoring the backup, I have:
/data_backup_restore/output/test1/file1.mha
and
/data/results/mhas/first_test/file1.mha
since the restored backup still uses the 'old' directory structure. I've changed it because it was a mess, but I haven't written down all changes/renames I've done, since there were a lot of them.
I would consider both of the above the same if filesize, modification date and filename match.
rsync -navi
, and while it was really fast, I could not get it to compare just the files while ignoring the path to the filefile1
withfile
? And do you want to check if the file exist in second directory or if the same file exist in second directory?