command line - How to recover deleted files in ubuntu using live usb? [based on filetype] - Ask Ubuntu


i had accidentally deleted few files ubuntu desktop. need recover perl files had been sitting in /home/user directory. how can done? able boot using live ubuntu usb. please explain.

testdisk lot more efficient photorec. problem testdisk doesn't recover deleted files. if accidentally reformat partition, testdisk can recover thousands of files without missing single file, if deleted file sending trash , emptying trash, testdisk can't recover it.

so use testdisk first, , if recovered of deleted files testdisk, you're done. if recovered of deleted files testdisk, can decide whether you're done or not. if you're not done after running testdisk, can try recovering deleted files using photorec.

photorec can selectively recover files based on filetype(s), photorec/testdisk can't selectively scan individual directory lost files unless had mounted whole hard drive partition directory. in cases, filename stored in file itself. photorec tries recover filename in case, of time photorec can't recover filenames.


recover files based on filetype using photorec

  1. install testdisk ubuntu software center.

    sudo apt-get install testdisk 
  2. launch photorec.

    open terminal , launch photorec (as root).

    sudo photorec 
  3. select hard disk.

  4. select partition type.

    if hard disk has linux partitions, select [intel].

  5. select filetype option.

    move [file opt] , press enter. here can disable file types pressing s. use space toggle check button. select filetype(s) recover. perl can select pl perl script or pm perl module.

  6. select options.

    photorec has list of different options. under normal circumstances don’t need modify them.

  7. select partition.

    move selector or down partition have removed file(s). select [search] , press enter.

  8. select filesystem type.

    if using linux, it's going ext2/ext3/ext4, default selection ext2/ext3. otherwise if recovering files partition formatted fat or ntfs select other.

  9. select space analysis.

    select free if didn’t write partition after removing particular file, otherwise select whole.

  10. select directory recovered files

    select path recovered files stored. press y.

photorec show how many files has recovered.

source: revised how recover deleted files in linux using photorec


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User