0

A folder was created when I used a utility to recover pictures from a cd card that I deleted by mistake.

Now I can't delete it or move it. I am told I am not the owner of it even when I am logged on as root.

How can I delete the recup_dir.1 folder from my machine?

1

When logged in as root open up a terminal, the command you should use is rm -rf ./recup_dir.1

  • Copied rm -rf ./recup_dir.1 from your post and entered it into a terminal and this was the output. – Bob Brazie Feb 4 '12 at 23:05
  • Sorry about that. <g> bob@bob-HP:~$ rm -rf ./recup_dir.1 The folder is still locked and I can not delete it. – Bob Brazie Feb 4 '12 at 23:06
1

I found this on launchpad and it answered my question. Thanks for the hilp.

I am not completely sure where these files are coming from, but http://www.aypcservices.com/?p=5525 (middle part of the page) indicates that they might be reconstructed picture files from the PhotoRec program (part of the testdisk package).

It seems they have been created in a way that they are owend by 'root', and you do not have access rights to look at them. To overcome that restriction you can do the following:

Open a terminal (Applications -> Accessories -> Terminal, or press ALT+F2, or press Ctrl+Alt+T) and in the window that opens enter "gksudo nautilus" (without the quotes). This will ask for your password and open a new file browser window with access rights as if logged in as root.

Now you should be able to browse all files.

Please use extreme caution when using this technique, because in that window the restrictions imposed on a 'normal user' (like: no rights to delete important system files) are temporarily overridden.

0

sudo rm -rf recup_dir* This command will delete all dir begin with recup.

0

The following worked for me, taken from this page:

"You may need to take ownership of the folders: http://support.microsoft.com/kb/308421 Change the owner of the files, example:

sudo chown -R username recup_dir

or

sudo chown -R username /home/username/testdisk-6.14/recup_dir

(When asked for the password, use the password from your user session to validate the sudo command)"

-1
sudo rm -r /home/elrafie/recup_dir.1
sudo rm -r /home/elrafie/recup_dir.2
-1
sudo rm -r /home/elrafie/recup_dir.*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.