Linux – Fastest way to chown a whole device (xfs)

chownlinuxxfs

I need to chown 1.5 million files on a drive. I'm currently doing:

sudo chown -R www-data:www-data /root-of-device

but it takes an awfully long time to run. I was wondering if there was some sort of superfast low-level way to chown every file on the drive.

Best Answer

Use xargs -p or GNU parallel to speed things up considerably.