撤消将我所有文件串联在一起的错误命令提示符副本 [英] Undo a botched command prompt copy which concatenated all of my files

查看:95
本文介绍了撤消将我所有文件串联在一起的错误命令提示符副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 8命令提示符中,我插入了一个备份驱动器,然后导航到我的用户目录.我执行了命令: copy Documents G:/Seagate_backup/Documents

In a Windows 8 Command Prompt, I had a backup drive plugged in and I navigated to my User directory. I executed the command: copy Documents G:/Seagate_backup/Documents

我以为copy将在备份驱动器上创建Documents目录,然后将C:Documents目录的内容复制到其中.那不是什么!

What I assumed was that copy would create the Documents directory on my backup drive and then copy the contents of the C: Documents directory into it. That is not what happened!

我继续擦除硬盘驱动器并重新安装操作系统,以为我已经备份了重要文件,却发现copy似乎串联了所有不同类型的C:Documents文件(.doc ,.pdf,.txt等)合并到一个称为文档"的文件中.该文件当然是不可读的,但是在记事本中打开它可以显示发生了什么.我可以看到我的一些文档,这些文档在整个超长文件中都是纯文本格式.

I proceeded to wipe my hard-drive and re-install the operating system, thinking I had backed up the important files, only to find out that copy seemingly concatenated all the C: Documents files of different types (.doc, .pdf, .txt, etc) into one file called "Documents." This file is of course unreadable but opening it in Notepad reveals what happened. I can see some of my documents which were plain text throughout the massively long file.

我该如何撤消!!?这很糟糕,因为我实际上是在帮助一个朋友,并且对自己很确定,但是现在这已经发生了.我唯一想做的就是在级联文件中搜索一些常见的分隔符,并编写某种脚本将文件拆分回去.但是然后我不得不猜测每个部分的扩展...

How do I undo this!!? It's terrible because I was actually helping a friend and was so sure of myself but now this has happened. The only thing I can think of doing is searching for some common separator amongst the concatenated files and write some sort of script to split the file back apart. But then I would have to guess the extensions of each of the pieces...

推荐答案

以复制使用的方式将文件合并在一起,丢弃重要的文件系统信息,例如文件大小和文件名.虽然文件名可能不那么重要,但文件大小却很重要.操作系统使用这两个参数来区分文件.

Merging files together in the fashion that copy uses, discards important file system information such as file size and file name. While the file name may not be as important the size is. Both parameters are used by the OS to discriminate files.

如果您之前损坏了文件分配表并且所有文件都消失了,则此问题听起来很熟悉.在这两种情况下,您最终都会遇到一个二进制blob(它是实际磁盘或类似文件的文件,可能类似于磁盘映像),而缺少任何大小和文件名信息.

This problem might sound familiar if you have damaged your file allocation table before and all files disappeared. In both cases, you will end up with a binary blob (be it an actual disk or something like your file which might resemble a disk image) that lacks any size and filename information.

幸运的是,这是许多文件系统恢复工具可以提供帮助的地方.他们专门研究匹配模式.具体来说,他们正在寻找有关文件的类型,起始位置和大小的线索. 例如,可以通过许多具有一组幻数的文件类型来启用此功能,这些幻数用于允许程序检查文件是否确实是扩展名所声称的那种类型.

Fortunately, this is where a lot of file system recovery tools can help. They are specialized in matching patterns. Specifically they are looking for giveaway clues to what type a file is of, where it starts and what it's size is. This is for instance enabled by many file types having a set of magic numbers that are used to allow a program to check if a file really is of the type that the extension claims to be.

原则上,可以或多或少很好地撤消此过程. 您将需要使用数据恢复工具或其他分析工具(例如binwalk)来提取级联的二进制blob.基本上,与用于恢复已删除文件的工具相同的工具应该能够再次提取您的文档.当然没有任何文件名.我建议将文件重命名为磁盘映像(.img)并从操作系统中将其作为虚拟硬盘安装(不必担心它没有文件系统-它应该显示为未格式化的驱动器)或直接使用可以读取二进制文件的数据恢复工具或分析工具(例如,binwalk可以直接执行此操作,但可能找不到所有类型的文件,因为它主要用于解压缩可以以相同或相似方式组装的固件映像.您的文件如何结束).

In principle it is possible to undo this process more or less well. You will need to use data recovery tools or other analysis tools like binwalk to extract the concatenated binary blob. Essentially the same tools that are used to recover deleted files should be able to extract your documents again. Without any filename of course. I recommend renaming the file to a disk image (.img) and either mounting it from within the operating system as a virtual harddisk (don't worry that it has no file system - it should show up as an unformatted drive) or directly using a data recovery tool or analysis tool which can read binary files (binwalk, for instance, can do that directly, but may not find all types of files as it's mainly for unpacking firmware images that may be assembled in the same or a similar way to how your files ended up).

这篇关于撤消将我所有文件串联在一起的错误命令提示符副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆