Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Renumbering UIDs and GIDs?



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




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org