I needed to change specific owners and groups for files that I copied (with tar cf
) from one server to another with (some) different owners and groups. I used the syntax below:
chown -R --from=:currentgroup newuser:newgroup /some/directory
chown -R --from=:currentgroup :newgroup /some/directory
The solution, as so often, came from the Stack Exchange Network: