![Как восстановить файлы, удаленные с помощью Foremost](https://rvso.com/image/1400546/%D0%9A%D0%B0%D0%BA%20%D0%B2%D0%BE%D1%81%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C%20%D1%84%D0%B0%D0%B9%D0%BB%D1%8B%2C%20%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5%20%D1%81%20%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E%20Foremost.png)
Я был не в той папке и удалил список очень важных файлов python! Как мне настроить правила в foremost, чтобы восстановить их? и с помощью 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
Formost обрабатывает только определенные файлы, такие как изображения и фильмы.
Foremost не может восстанавливать файлы Python или Javascript из коробки.1,2
Однако вы можете заставить его обнаруживать дополнительные типы файлов, как описано ниже.в этом сообщении в блоге.
Например, создав foremost.conf
файл со следующими записями, разделенными табуляцией:
py y 100000 #!/usr/bin/env\spython3
Вы можете искать файлы Python с суффиксом py
, с учетом регистра ( y
), просматривая до 100000 байт в заголовке и выполняя поиск строки shebang.