Reputation: 33
Accidentally I have deleted few files using rm -rf command. Is there is any way to recover those files. I need them.
Please help me out. Thanks.
Upvotes: 1
Views: 1170
Reputation: 28199
Install foremost
sudo apt-get install foremost
Take a look at man foremost
to learn how to use foremost.
First make an empty writable directory to save recover files in a partition other than that you are going to recover.
Then run foremost.
I am going to recover my home partition ( let's say /dev/sda5).
$ sudo foremost -t jpg -i /dev/sda5 -o /recovery/data Finally set user permission to /recovery/data/ to view image. type
$ sudo chown YOUR_USER_NAME /recovery/data -R
Some important foremost command line arguments.
-i :- partition/image to recover
-o :- location to store recovered files.
-t :- built in file filter options. you can give multiple filters by separating using commas. (e.g: for jpg and pdf: -t jpg,pdf )
-q :- quick mode.
Also refer : Recover Your Deleted Files In Ubuntu | The easy way.
Upvotes: 1