How to recover deleted files on Linux
Senin, 07 Oktober 2013
0
komentar
http://xmodulo.com/2013/10/recover-deleted-files-linux.html
On a typical file system, deleting a file doesn’t necessarily mean that it is gone for good. When a file is removed, its meta data (e.g., file name, size, time, location of data block, etc.) is gone, but actual file data is untouched inside the file system, until the location of the data is overwritten by other file data. This means that if you accidentally deleted a file, there is a chance that you can recover the file.
In this tutorial, I describe how to recover deleted files on Linux. There are several file recovery tools on Linux. Among them is PhotoRec which is an open source file recovery software licensed with GPLV v2+. PhotoRec is available on Linux, BSD, MacOS X and Windows.
For 32-bit Linux:
When you have removed a file accidentally, what’s important is to NOT save any more files on the same disk drive or memory card, so that you do not overwrite the deleted file.
As soon as you discover the lost files, run PhotoRec to restore them as follows.
Next, choose the partition which contains deleted files.
Choose the file system type used for the partition. In general, you can identify the file system type from the output of mount command. In case of the SD card used by Canon camera, it is formatted in VFAT file system. So choose “Other”.
Choose if all disk space needs to be analyzed. In this case, choose “Free”, which means scanning for unallocated space only.
Choose a destination folder where restored files will be stored. Here you must choose a different partition or drive than the one being analyzed. Press “C” when a destination is chosen.
Now PhotoRec starts reading individual sectors for lost files. You will see the progress of the recovery. Depending on the size of media, it will take a couple of minutes or even longer.
After scanning is completed, the restored files will be stored in the destination folder that you configured. Note that the size of a restored file may be either the same as or larger than the original file size.
On a typical file system, deleting a file doesn’t necessarily mean that it is gone for good. When a file is removed, its meta data (e.g., file name, size, time, location of data block, etc.) is gone, but actual file data is untouched inside the file system, until the location of the data is overwritten by other file data. This means that if you accidentally deleted a file, there is a chance that you can recover the file.
In this tutorial, I describe how to recover deleted files on Linux. There are several file recovery tools on Linux. Among them is PhotoRec which is an open source file recovery software licensed with GPLV v2+. PhotoRec is available on Linux, BSD, MacOS X and Windows.
PhotoRec Features
As the name implies, PhotoRec is originally designed to restore accidentally deleted digital photos. However, now it has become versatile enough to support various file formats. PhotoRec recovers lost files by checking data blocks one by one against a signature database of different file types.- Supported file formats: video (avi, mov, mp3, mp4, mpg), image (jpg, gif, png), audio (mp3, ogg), document (doc(x), ppt(x), xls(x), html), archive (gz, zip) etc.
- Supported file systems: EXT2, EXT3, EXT4, HFS+, FAT, NTFS, exFAT
Install PhotoRec on Linux
The official site offers PhotoRec binaries for various platforms. So you can download static PhotoRec binary for your Linux system.For 32-bit Linux:
$ wget http://www.cgsecurity.org/testdisk-6.14.linux26.tar.bz2
$ tar xvfvj testdisk-6.14.linux26.tar.bz2
For 64-bit Linux:$ tar xvfvj testdisk-6.14.linux26.tar.bz2
$ wget http://www.cgsecurity.org/testdisk-6.14.linux26-x86_64.tar.bz2
$ tar xvfvj testdisk-6.14.linux26-x86_64.tar.bz2
The PhotoRec executable (photorec_static) is found in the extracted directory.$ tar xvfvj testdisk-6.14.linux26-x86_64.tar.bz2
Recover Deleted Photos and Videos
In this tutorial, I demonstrate how to recover deleted photos and video files stored on an SD card, which were generated by Canon EOS Rebel T3i.When you have removed a file accidentally, what’s important is to NOT save any more files on the same disk drive or memory card, so that you do not overwrite the deleted file.
As soon as you discover the lost files, run PhotoRec to restore them as follows.
$ sudo photorec_static
You will be shown a list of available media. Choose the media where you have deleted files.Next, choose the partition which contains deleted files.
Choose the file system type used for the partition. In general, you can identify the file system type from the output of mount command. In case of the SD card used by Canon camera, it is formatted in VFAT file system. So choose “Other”.
Choose if all disk space needs to be analyzed. In this case, choose “Free”, which means scanning for unallocated space only.
Choose a destination folder where restored files will be stored. Here you must choose a different partition or drive than the one being analyzed. Press “C” when a destination is chosen.
Now PhotoRec starts reading individual sectors for lost files. You will see the progress of the recovery. Depending on the size of media, it will take a couple of minutes or even longer.
After scanning is completed, the restored files will be stored in the destination folder that you configured. Note that the size of a restored file may be either the same as or larger than the original file size.
TERIMA KASIH ATAS KUNJUNGAN SAUDARA
Judul: How to recover deleted files on Linux
Ditulis oleh Unknown
Rating Blog 5 dari 5
Semoga artikel ini bermanfaat bagi saudara. Jika ingin mengutip, baik itu sebagian atau keseluruhan dari isi artikel ini harap menyertakan link dofollow ke http://androidjapane.blogspot.com/2013/10/how-to-recover-deleted-files-on-linux.html. Terima kasih sudah singgah membaca artikel ini.Ditulis oleh Unknown
Rating Blog 5 dari 5
0 komentar:
Posting Komentar