최우선을 사용하여 삭제된 파일을 복구하는 방법

최우선을 사용하여 삭제된 파일을 복구하는 방법

나는 잘못된 폴더에 있었고 매우 중요한 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 줄을 검색할 수 있습니다.

관련 정보