Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

verify large directory after copy files

###
### Replace /path/to/original with the path of the original directory you copied.
### Replace /path/to/destination with the path of the destination directory you copied to.
### Replace <first-common-ancestor> with the common ancestor directory between both. Example: you are copying from /media/foo/bar to /media/test/dst/, so that dst, after the copy operation is done, has the directory bar. The first common ancestor is bar here; because all files under bar will have the same relative path.
###

find /path/to/original -type f -exec bash -c 'diff -rq --no-dereference "$@" "/path/to/destination/$(sed -r "s/^.*(<first-common-ancestor>.*)$/1/g" <<<"$@")"' bash {} ;
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #verify #large #directory #copy #files
ADD COMMENT
Topic
Name
2+7 =