Foremostを使用して削除されたファイルを回復する方法

Foremostを使用して削除されたファイルを回復する方法

間違ったフォルダにいて、非常に重要なPythonファイルのリストを削除してしまいました。それらを回復するために、まずルールをどのように設定すればよいでしょうか?Debian OSを使用しています

/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

しかし、ファイル.pypythonと.jsjavascript

答え1

Foremost は画像や動画などの特定のファイルのみを処理します。

デフォルトでは、Foremost は Python または Javascript ファイルを回復できません。12

ただし、説明されているように、追加のファイルタイプを検出させることもできます。このブログ記事で

たとえば、foremost.conf次のタブ区切りのエントリを含むファイルを作成します。

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

サフィックスpy、大文字と小文字を区別する ( y)、ヘッダーの最大 100000 バイトまで検索、および shebang 行の検索を使用して Python ファイルを検索できます。

関連情報