Hi All,
I need to change the ownership of about 1e6 files from 17 old owners to 17 new owners. the files are in multiple directories. I can run "chown -R" 17 times in the top directory but I thought there must be a more efficient way and perl is probably my best bet.
Instead of using chown which will go over the same file 17 times I was looking at a more intelligent solution which inspects each file individually and checks if the owner is one of the 17 old ones and changes the ownership to the new owner. I assume that this would be much quicker as well.
My perl knowledge is limited so I was hoping one of you can help me out. Of course I'm not necessarily asking you to write the script for me but maybe just pointing me in the right direction.