I am trying to find particular directory in one path and move the directory in other path using find.
Source directory looks like below,
/Dir1/country1/month1/date1,date2,date3
/Dir1/country2/month1/date1,date2,date3
...
.
.
/Dir1/country10/month1/date1,date2,date3
I am trying to find date1 directory and move to destination
/Backup/source1/Dir1/
I am using below command
[root@mytest Dir1]# find -name "date1" -exec mv {} /Backup/source1/Dir1/{} \;
and I am getting below error.
mv: failed to preserve ownership for `/Backup/source1/Dir1/./country1/month1/date1/date1/date1_1.txt': Operation not permitted
Not sure how to remove duplication of date1 Directory in destination and "./" is also creating issue.
Best Wishes, KJ