So stellen Sie mithilfe von „forest“ gelöschte Dateien wieder her

So stellen Sie mithilfe von „forest“ gelöschte Dateien wieder her

Ich war im falschen Ordner und habe eine Liste sehr wichtiger Python-Dateien gelöscht! Wie kann ich die Regeln in Frontal konfigurieren, um sie wiederherzustellen? und unter Verwendung des Debian-Betriebssystems

/etc/foremost.conf

 CONFIGURATION FILE
              The configuration file is used to control what types  of
              files  foremost  searches  for.  A  sample configuration
              file, foremost.conf, is included with this distribution.
              For each file type, the configuration file describes the
              file’s extension, whether the header and footer are case
              sensitive,  the  maximum  file  size, and the header and
              footer for the file. The footer field is  optional,  but
              header, size, case sensitivity, and extension are not!

              Any  line  that begins with a pound sign is considered a
              comment and ignored. Thus, to skip a file type just  put
              a pound sign at the beginning of that line

              Headers and footers are decoded before use. To specify a
              value in hexadecimal use \x[0-f][0-f], and for octal use
              \[1-9][1-9][1-9].   Spaces  can  be  represented  by \s.
              Example: "\x4F\123\I\sCCI" decodes to "OSI CCI".

              To match any single character (aka a wildcard) use a  ?.
              If you need to search for the ? character, you will need
              to change the wildcard line *and*  every  occurrence  of
              the old wildcard character in the configuration file. Do
              not forget those h

aber Datei .pyPython und .jsJavascript

Antwort1

Foremost verarbeitet nur bestimmte Dateien wie Bilder und Filme.

Foremost kann standardmäßig keine Python- oder Javascript-Dateien wiederherstellen.1,2

Sie können jedoch zusätzliche Dateitypen erkennen lassen, wie erklärtin diesem Blogbeitrag.

Beispielsweise durch Erstellen einer foremost.confDatei mit den folgenden, durch Tabulatoren getrennten Einträgen:

py  y   100000     #!/usr/bin/env\spython3

Sie können nach Python-Dateien mit dem Suffix suchen py, wobei die Groß-/Kleinschreibung ( y) beachtet wird, indem Sie bis zu 100.000 Bytes im Header nachsehen und nach der Shebang-Zeile suchen.

verwandte Informationen