I accidentally removed some important files from Linux with rm *.
How can I restore those files?
The distribution used is CentOS 6.4
I accidentally removed some important files from Linux with rm *.
How can I restore those files?
The distribution used is CentOS 6.4
you may try "Scalpel" it may be help. Scalpel is an open source file system recovery for Linux.
command for installing scalpel # yum install scalpel Once scalpel is installed you need to do text editing. By default scalpel utility has its own configuration file in ‘/etc‘ directory and full path is “/etc/scalpel/scalpel.conf” or “/etc/scalpel.conf“. You can notice that everything is commented out (#). So before running scalpel you need to uncomment the file format that you need to recover. However uncomment the entire file is time consuming and will generate a huge false results.
Let say for example I want to recover only ‘.jpg‘ files, so simply uncomment ‘.jpg‘ file section for the scalpel configuration file. Go to terminal and type following syntax. The ‘/dev/sda1‘ is a location of a device from where the file is already deleted. As you see, the scalpel is now performing its process and it will take time to recovery your deleted file depending upon the disk space that you are trying to scan and the speed of the machine.
I would recommend you all to have a habit of using only delete instead of “Shift + Delete“. Because as said prevention is always better than cure.
First of all, remount partition file was on read only. Then look at extundelete.