//创建文件
public void createTxt(){
File ct=new File(filetxt);
ct.setWritable(true, false);
ct.setReadable(true, false);
try {
Process process =null;
ct.createNewFile();
/获取LINUX权限的设置
String command1 = “chmod xxx “+ct.getAbsolutePath();
process = Runtime.getRuntime().exec(command1);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(“创建文件失败”);
}
}