[clug] Syncronising UID/GIDs when migrating to LDAP

Martijn van Oosterhout kleptog at svana.org
Thu Sep 13 12:20:51 GMT 2007

On Thu, Sep 13, 2007 at 10:11:32PM +1000, Adam Thomas wrote:
> > find <whatever> -print0 | xargs -0 chown <new-uid>
> >
> > This will be much faster.
> This will however bomb out if the user owns enough files to hit the
> command line length limit.

No it won't:

       --max-chars=max-chars, -s max-chars
              Use at most max-chars characters per command line,
              including the command and initial-arguments and the
              terminating nulls at the ends of the argument strings. 
              The default is 131072 characters, not including the size
              of the environment variables (which are provided for
              separately so that it doesn't matter if your environment
              variables take up more than 131072 bytes).  The operating
              system places limits on the values that you can usefully
              specify, and if you exceed these a warning message is
              printed and the value actually used is set to the
              appropriate upper or lower limit.

Note the default. xargs entire reason for existance is to get around
the command line length limits...
Martijn van Oosterhout   <kleptog at svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20070913/a2759966/attachment.bin

More information about the linux mailing list