I deleted some important files for me with the extension ".py". How can I restore them using the "scalpel" program? Which line should I uncomment in the config of this program?
1 answer
Most likely for Python there is no necessary line in the config file.
Accordingly, you need to create your template:
Type | Case sensitive | Size range | Header | Footer | Search option py | y | 100000000 | ??? | ??? | REVERCE I do not know if there is any obligatory start to the file, as, for example, in php <?php и конец как ?> (Header & Footer, respectively). Size range - any (file size in bytes, in fact), you can in the option FROM: TO
Generally read man scalpel, he can open his eyes to many things.
UPD: I found the article here: https://habrahabr.ru/post/247421/
- And yes, I, of course, understand that this will not change anything at the moment - but in the future try using any backup methods. And it is better to make git-repos (you can directly on your computer), and use it as a version control system. At the same time, and you can restore, in which case. It is also a good practice for a developer of any level. - Crystal
- Failed to restore files. - Mike Ru
- Added your lines to the template and wrote "#! / Usr / bin / python3.4" to "Header". The program scanned my "/ dev / sdb6" (/ home) for about one hour and then stopped without any messages. ..... Everything, I will not return to this topic any more so as not to traumatize my psyche ......> And it is better to do git-repos. Thanks for the advice, I will use. - Mike Ru
- @MikeRu well, from what I read about the scalpel while I was searching, there are file types that it cannot recover. Well, or you need to try to restore them as plain text. If you added my line with questions - then it could not find anything. In fact, if you make $ cat <filename>, the first three characters should fall under the header (and this ???) and the last three under the footer (and in my example, this again ???). Then it is better to use a regular expression denoting any characters. - Crystal
|
*.pyfiles. - jfs