Source Code : Create some temp files, ls them, and rm them

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Create some temp files, ls them, and rm them

  
import java.io.*;

/*
 * create some temp files, ls them, and rm them
 */
public class ExecDemoRm {
  public static void main(String[] args) throws IOException {
    for (int i=0; i<10; i++) {
      new File("/tmp/ww" + i).createNewFile();
    }
    Runtime.getRuntime().exec("ls -l /tmp/ww? > /tmp/report");
    Runtime.getRuntime().exec("rm -f /tmp/ww?");
  }
}



           
         
    
  

Thank with us