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

Re: changing user id for all files in a file system

Stephen R Laniel wrote:
> sudo find / -uid [old UID] |xargs -i sudo chown [new UID] '{}'

Thanks for introducing me to the xargs command - never heard of it
before, but I am sure it will come in handy some day. :-)

The '-i' option is deprecated in xargs from unstable, though.
Alternative seems to be:

find / -uid OLDUID | xargs -I [] chown NEWUID []

(I've removed the 'sudo' bits, as it would not work with the default

Hope this helps,

George Borisov

DXSolutions Ltd

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: