⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testbackupfile.java

📁 数据采集:该启动器可以由用户发起为一个后台服务
💻 JAVA
字号:
package src.com.tarena.dms.client;import java.io.IOException;import java.text.SimpleDateFormat;import java.util.Date;public class TestBackupFile {	//private static String command = "cmd /c move";windows下	private static String command = "mv";	private static String sFile = "";	private static String dPath = "DMS/bin.test/history";	/**	 * @param args	 * @throws IOException 	 * @throws InterruptedException 	 */	public static void main(String[] args) throws IOException, InterruptedException {		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmm");//格式化日期		String dStr = sdf.format(new Date());		String dFile = "wtmpx"+dStr;				String commandStr = command + " " + sFile + " "+ dPath + dFile;		System.out.println(commandStr);				Runtime rt = Runtime.getRuntime();		Process pr = rt.exec(commandStr);		pr.waitFor();			}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -