I have a Java program that executes Runtime.getRuntime().exec(\"ls -l\"); many times, once for each directory in the system.
My test system has more than 1,000 direc
It would be better to use java.io.File and the appropriate methods on those classes for walking and manipulating the file system.
You don't say why you are doing this degenerate behavior this way but here is an example of listing all the files in a tree.