Change Owner on many files how to?
I have a few thousand files spread through out a number of directories that need the owner and group changed. The problem is, it is not all files that need these changes. I copied the files from a susie to a fedora install and the user ids / group ids changed.
So what I need to do is find all files with uid 30 and change it to a user. Then I need to do the same based on gid. I tried the find command based on UID and it did not work correcly. The files that need to be changed do not show a user but a number because the users do not exist.
I tried
find -nouser -exec ls -l {} \;
But that returned everything with either group or owner without owner. That will not work. I need to find specific by group or user.
I tried also
find / -uid 30
But this returned everything.
Any thoughts?