LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   PhotoRec completely filled home - can not remove the recup_dir.# directories (https://www.linuxquestions.org/questions/linux-newbie-8/photorec-completely-filled-home-can-not-remove-the-recup_dir-directories-634174/)

Herbivore 04-09-2008 08:54 AM

PhotoRec completely filled home - can not remove the recup_dir.# directories
 
System: Dual boot Win XP and Linux Mint (Cassandra). Running Linux exclusively. Linux file sys is ext3. Swap, root, and home are separate partitions on same hard disk.

1st use of PhotoRec. Wanted to recover deleted 700MB .avi file written to an NTFS partition on a different hard disk from home. File was deleted by mistake when the Del key was accidentally pressed. Didn't realize PhotoRec would write the whole partition to the home directory which consequently got filled to 100%. Attempts to recover space on the home directory from file browser window by deleting the recup_dir directories yields message, "no permission to modify parent folder."

From terminal tried

sudo rm recup_dir.1

Result: rm: cannot remove directory 'recup_dir.1': No such file or directory

ls command shows that the directory is there.



Will try to not reboot and have stopped all activity. Using a second computer to write this. Total newbie needs H e l p!

pljvaldez 04-09-2008 11:01 AM

You can try rm -rf recup_dir.1 which will force the directory deletion recursively (i.e. deleting all files inside it too).

If you can't get the machine running because /home is full, try using a live CD and then mount the drive and delete the directory from the live CD.

I've used photorec many times, and it doesn't copy the whole disk. What it does is search the disk for every single file of the types you've selected. Then it writes all of the files it finds into the directory you're running it from. It doesn't recover just one single file at a time. When you run it, you should make sure you've only checked the boxes for the *.avi files. Then you'll only get all the *.avi files.

Herbivore 04-09-2008 12:04 PM

Success
 
Quote:

Originally Posted by pljvaldez (Post 3115900)
You can try rm -rf recup_dir.1 which will force the directory deletion recursively (i.e. deleting all files inside it too).

If you can't get the machine running because /home is full, try using a live CD and then mount the drive and delete the directory from the live CD.

I've used photorec many times, and it doesn't copy the whole disk. What it does is search the disk for every single file of the types you've selected. Then it writes all of the files it finds into the directory you're running it from. It doesn't recover just one single file at a time. When you run it, you should make sure you've only checked the boxes for the *.avi files. Then you'll only get all the *.avi files.

This worked fine. Home had 122k free. Maybe PhotoRec left a little wiggle room. Thank you! And the information about how PhotoRec works is very helpful. There could easily be too many .avi files for the directory into which it would write. Must be careful.

Thanks again.

daddykins 06-03-2013 12:47 PM

Another method
 
I'm using Mint 14. I had the recup.dir problem after recovering photos and hd vids from a memory card. I just right-clicked the folder and ran it as root, it was then possible to simply delete it in the usual way (shift+del)


All times are GMT -5. The time now is 05:12 AM.