当你在硬盘分区间复制很多文件时,当你使用下载软件时,当你用Word写作时,如果忽然遇见停电.Windows失去响应或者系统自动重新启动,在看着屏幕一黑的瞬间你会有何感受?只能希望在重新启动以后重要的文就不要丢失了.可是很多时候事与愿违,重新启动以后除了“FOUND.000”文件夹中一个个类似“file0001.chk”的文件之外,你原来的文件已经“丢失”.别急,其实这些文件中很有可能包含你期待的重要数据,要做的只是把它们恢复原貌(将CHK文件恢复成可以识别的不同类型文件). 工具/原料   Wi…
linux move file / folder bash command mv $ which mv $ man mv # mv [-f] source target/ target folder $ sudo mv -f mongodb-macos-x86_64-4.2.6.tgz /usr/local demo ➜ Desktop which mv /bin/mv ➜ Desktop man mv ➜ Desktop mv mongodb-macos-x86_64-4.2.6.tgz /u…
Many times we might changed one file which we don't intent to do... but it was too late, until we found it, it is already push to repo. Let's assume, First, we checkout a feature branch, we have two files: a.txt: Init a b.txt: Init b This is original…
经常需要把服务器的某些文件传到 Mac,或者获取 Mac 的一些文件到服务器.尽管有很多命令scp, ftp, rsync都可以,霸特每次都有敲好长的命令,好烦,而且还要输入密码.所以想着 wrap 到 expect 脚本这样密码什么的都不用输入了. 下面这个是放在服务器端的,用于把file/folder 传到 Mac #!/usr/bin/expect #file: _getF.expect # 和 Bash 的变量一样 # 定义时不加$,用的时候加 set host RuiLi@10.157…
In a Maven project, we may often struggle to get a certain file (e.g. json file or sql file). Here is how to place the resource file and use it in the java class. 1. If the main class is in folder src/main/java/, the resource file should be placed in…
If you accidentally marked all your files as "delete" (your file/folder has a red x on it), you can use below command to remove the delete state. svn revert -R .…
1.创建文件 import java.io.File; import java.io.IOException; public class CreateFileExample { public static void main( String[] args ) { try { File file = new File("c:\\newfile.txt"); //创建文件使用createNewFile()方法 if (file.createNewFile()){ System.out.pr…
类 java.io.File 的使用 使用 File 的软件包 java.awt 包含用于创建用户界面和绘制图形图像的所有类. java.io 通过数据流.序列化和文件系统提供系统输入和输出. java.lang 提供利用 Java 编程语言进行程序设计的基础类. java.security 为安全框架提供类和接口. java.util 包含 collection 框架.遗留的 collection 类.事件模型.日期和时间设施.国际化和各种实用工具类(字符串标记生成器.随机数生成器和位数组).…
Managing IIS Log File Storage   You can manage the amount of server disk space that Internet Information Services (IIS) log files consume by using compression, remote storage, scripted deletion, and an IIS Log Cleaner Tool. Overview The log files tha…
1.读取文件夹中的文件 /** * 读取图片文件 * @param imgPath 文件所在的文件夹绝对路径 * @return * @throws FileNotFoundException */ public static List<String> readImg(String imgPath)throws FileNotFoundException{ System.out.println("----------------------------读取start---------…