I need to sync only ownership and group of each file and dir between two server filesystems. That's to say if I have server A and server B, I don't need and don't want to copy data from one server to other, I need to set the same owner and group from each file in B that exists in A. If a file/dir doesn't exist in A, or viceversa, I don't need to do nothing about, only to change owner and group of every file and directory that exists in both servers to the one of the file/dir in server A. I know that "chown --reference
" make that, but I don't know how to use it for change according to other files and directories.
I wish I explained my question correctly.
Please, any suggestion?
Thanks in advance