Recovering deleted files

Discussion in 'Linux Beginners' started by Displayname69, Jun 12, 2022.

  1. Displayname69

    Displayname69 New Member

    Howdy!

    I recently deleted a file and I was wondering if anyone had any recommendations on the easiest way to get it (or try to get it) back. I'm using Kali Linux, if anyone has any good methods or programs, that would be great! Thanks in advance.
     
    Anmol likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. Displayname69

    Displayname69 New Member

    Thank you Till.
     
  4. Martingray

    Martingray New Member

    Recovering files you deleted isn't very difficult. Several tools and utilities help you recover files.

    While recovering, you must ensure that you have root access (superuser privileges) to the machine. Please ask the administrator to carry out the recovery process if you haven't.

    Now, here are the practical instructions for the process:


    1) Launch the terminal and use the mkdir command to create a new directory. Ideally, you should create this directory on the Desktop. Name it whatever you like (recovery is a nice one)
    2) Use cd <foldername> to go to the folder.
    3) I will use Foremost to recover the files. for this, first, you need to install it by using the command: Sudo apt install Foremost
    4) If you know the path of the deleted file (or the partition where it was located), type it out in a text file. Otherwise, use the fdisk -l command to find the path structure.
    5) Now, I'll simply use the command: Foremost -t all -i /dev/sb1 -v -o /root/Desktop/recovery/
    This asks Foremost to find all files at the specified path (-i) and copy them to the specified folder (-o).


    Hope this helps!
     
    Anmol likes this.

Share This Page