John Oliver wrote: > I want to go through a directory recursively, find all files owned by a > certain group, and change them to a different group ownership. find and > cut aren't doing the trick for me, since there are different numbers of > spaces. Is there a better tool to do this with? >
Why do you need cut? I would use find with xargs. WARNING:untested find "$DIR" -type f -group "$GROUP1" -print0 | xargs -0 chgrp "$GROUP2" the -print0 and -0 are simply tricks to handle filenames with embedded spaces (yechh!). Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
