Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run du on parallel

I have a very big storage disk (16T). I want to run 'du' on it to figure out how much each subdirectory takes. However, that takes a very long time. Luckily, I have at my disposal a cluster of computers. I can therefore run 'du' on parallel, each job runs on a separate subdirectory, and write a simple script that does that. Is there already such a thing or must I write it myself?

like image 374
R S Avatar asked Jul 07 '14 08:07

R S


Video Answer


1 Answers

It is simple to do it using GNU Parallel:

parallel du ::: */*
like image 51
Ole Tange Avatar answered Sep 20 '22 19:09

Ole Tange