很悲剧的一不小心格式化了/home分区所在的目录。这个分区是ext4格式的,被重新格式化为ext4格式,直接使用mkfs.ext4命令做的格式化。恢复步骤:

  • 使用dd命令,将整个分区备份到镜像文件中
$dd if=/dev/sda8 of=sda8.image
  • 下载TestDisk
  • 运行testdisk压缩包中的photore_static
    • 虽然从名字上看是恢复图片的,但恢复其他文件的能力也很强。比如pdf,office文档,源代码文件
    • 该工具会自动识别硬盘分区的属性,比如格式、blocksize等等,使用默认的设置一般都没问题
    • 最后选择recover all就行

感谢这款工具,基本上一些图片、pdf、office、源码都恢复的差不多。但tar压缩包、视频恢复无望。除了个别能看出文件名称外,99%的恢复文件和文件夹都是以数字命名的。基本需要人工逐个筛查。

被频繁修改、保存的文本文件会被恢复出来多份,分别是不同版本的。这应该和文件在硬盘中存储的位置有关。

TestDisk支持各种操作系统,各种格式文件系统,几乎各种硬盘问题(分区表、删除文件恢复、启动段恢复),是文件恢复利器。

尝试失败的工具

  • ext3grep
  • extundelete

这两个工具都是用于恢复被rm命令删除的文件,而本文遇到的情况是格式化,所以没效果。

参考

 

Stencil codes are a lass of iterative kernels which update array elements according to some fixed patten.  They are commonly used in computer simulations , like computational fluid dynamics in the context of scientific and engineering application, solving partial differential equations, Jacobi kernel, Gauss-Seidel method, image processing and cellular automata.

Stencil codes usually perform a sequence of sweeps through a given  2- or 3- dimensional array. In addition to their importance in scientific calculations, stencils are interesting as an architectural evaluation benchmark because they have abundant parallelism and low computational intensity, offering a mixture of opportunities for on-chip parallelism and challenges for associated memory systems.

    Data Layout Transformation for Structured-Grid Codes on GPU I-Jui Sung, Wen-Mei Hwu University of Illinois at Urbana-Champaign(PACT 2010)
    Stencil Computation Optimization and Auto-tuning on State-of-the-Art Multicore Architectures, Kaushik Datta, SC’08
    Tiling optimizations for 3D scientific computations ( Supercomputing’00)
    Impact of modern memory subsystems on cache optimizations for stencil computations ( MSP’05)
    Schedule-independent storage mapping for loops (ASPLOS’98)
    Optimization and Performance Modeling of Stencil Computations on Modern Microprocessors (SIAM’09)
 

操作系统的任务管理,是个老生常谈的话题。是操作系统的四大功能–进程管理、内存管理、磁盘管理、设备管理中的一大管理。这篇文章介绍进程的生命周期、主要进程状态及其转换关系。并以Linux操作系统为例,浅谈。 Continue reading »

 

什么是分页

分页是操作系统中的内存管理机制。通过这种方式计算机可以为主存存取其他存储介质上的数据。在页存储管理机制中,OS从其他介质中得到相同大小的数据块,这种块即为页。 Continue reading »

2009-2011© 编译点滴 Suffusion theme by Sayontan Sinha

无觅相关文章插件,快速提升流量