I've copied a folder of data from one linux server to another via a tarball.
The group ids (GIDs) don't match up on the two servers, so I now have files that look like
-rw-rw-r-- 1 tim 1013 88 2008-11-14 10:18 config
There is a mixture of group ownerships in the folder, and I want to keep them owned by different groups on the same server, so I can't just use chgrp -R
.
How do I change all files/folders with GID 1013 to another group, without affecting other files/folders?
Thanks
This would change them all files owned by group 1013 to gid 1212. You could add additional options like
-type d
to find to restrict it to something like only directories, seeman find
.