![최우선을 사용하여 삭제된 파일을 복구하는 방법](https://rvso.com/image/1400546/%EC%B5%9C%EC%9A%B0%EC%84%A0%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%82%AD%EC%A0%9C%EB%90%9C%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20%EB%B3%B5%EA%B5%AC%ED%95%98%EB%8A%94%20%EB%B0%A9%EB%B2%95.png)
나는 잘못된 폴더에 있었고 매우 중요한 Python 파일 목록을 삭제했습니다! 이를 복구하기 위해 가장 먼저 규칙을 구성하려면 어떻게 해야 합니까? 데비안 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
파이썬과 .js
자바스크립트
답변1
Foremost는 이미지나 영화와 같은 특정 파일만 처리합니다.
기본적으로 Foremost는 Python 또는 Javascript 파일을 복구할 수 없습니다.1,2
그러나 설명된 대로 추가 파일 형식을 검색하도록 할 수 있습니다.이 블로그 게시물에서.
예를 들어 foremost.conf
다음과 같은 탭으로 구분된 항목을 사용하여 파일을 생성합니다.
py y 100000 #!/usr/bin/env\spython3
접미사 py
, 대소문자 구분( y
)을 사용하여 Python 파일을 검색하고 헤더에서 최대 100000바이트를 찾고 shebang 줄을 검색할 수 있습니다.