Renumbering UIDs and GIDs?
John Jannotti
jj at lcs.mit.edu
Wed May 22 13:36:57 EDT 2002
David Kramer <david at thekramers.net> writes:
> Fear is the enemy of knowledge and productivity.
>
> find / -gid $oldgid | xargs chgrp $newgrp
Except that this will fail if you have files with funny characters (like
quotes) in them. Use -print0 with find, and the -0 option to xargs.
But, to be fair, I think your second choice would also work.
> If you cannot conquer your fears,
>
> find / -gid $oldgid -exec chgrp $newgrp {} \;
>
> Untested, but 99% sure this will work, or at least not get you arrested.
jj
More information about the Discuss
mailing list