![Foremostを使用して削除されたファイルを回復する方法](https://rvso.com/image/1400546/Foremost%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E5%89%8A%E9%99%A4%E3%81%95%E3%82%8C%E3%81%9F%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E5%9B%9E%E5%BE%A9%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95.png)
間違ったフォルダにいて、非常に重要な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
しかし、ファイル.py
pythonと.js
javascript
答え1
Foremost は画像や動画などの特定のファイルのみを処理します。
デフォルトでは、Foremost は Python または Javascript ファイルを回復できません。1、2
ただし、説明されているように、追加のファイルタイプを検出させることもできます。このブログ記事で。
たとえば、foremost.conf
次のタブ区切りのエントリを含むファイルを作成します。
py y 100000 #!/usr/bin/env\spython3
サフィックスpy
、大文字と小文字を区別する ( y
)、ヘッダーの最大 100000 バイトまで検索、および shebang 行の検索を使用して Python ファイルを検索できます。