Re: Limiting parallel when used with recursion

2015-08-01 Thread Ole Tange
On Thu, Jul 30, 2015 at 11:08 PM, Schweiss, Chip wrote: > I have a process that I want run on every folder on a file system. The > operation has to happen from the deepest child folder first then back to the > parent. Some folders will have many folders, which is where parallel fits > well. H

Re: Limiting parallel when used with recursion

2015-08-01 Thread Achim Gratz
Ole Tange writes: > If you use 'find . -type d' you will get it in the exactly wrong > order. So how about simply reversing that: > > find . -type d | tac | parallel myprog find -depth -type d | parallel myprog Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blo

Re: Limiting parallel when used with recursion

2015-08-01 Thread Schweiss, Chip
The problem with that is that parallel will start execution on parent folder before the child process is finish. This is why I chose recursion. Each iteration calls parallel on all children, when complete executes on itself. The problem is there becomes many parallel processes and too many job