Linux命令

用java重命名文件名
String[] cmd = new String[] { "sh", "-c", "mv /home/wangsaiqi/PcapFile/SrvCategory/SubCategory/App_1.1" +
"  /home/wangsaiqi/PcapFile/SrvCategory/SubCategory/App_3.0" };
Process ps = Runtime.getRuntime().exec(cmd);

移动文件
String[] cmd = new String[] { "sh", "-c", "mv /home/wangsaiqi/PcapFile/SrvCategory/SubCategory/App_1.1" +
"  /home/wangsaiqi/PcapFile/SrvCategory/SubCategory" };
Process ps = Runtime.getRuntime().exec(cmd);

你可能感兴趣的:(linux命令)