0

I'm facing the following problem: I have a folder which I cannot delete. I cannot even list it's contents. The story of this folder is that it was being used to store some logs which increased significantly to be out of control because of some scripting error.
And of course its content is now flooding my hard drive. When I try to run an rm -r <folder_name> it just stalls and nothing happens. Eventually, I lost patience and I hit Ctrl + C
Any idea how to get rid of this folder :) ??
Thanks in advance!

  • Have you tried rm -fr? '-f' == force. – BillWeckel Nov 27 '18 at 14:16
  • 1
    Find/kill/fix the "scripting error". Then delete the folder. – heynnema Nov 27 '18 at 14:37
1

When I try to run an rm -r it just stalls and nothing happens.

Depending on what filesystem and hardware is in use, this may take significant time. Deleting a lot of small files may easily take a minute on a normal hard drive.

You can run rm -rv /path to show what rm is actually doing. You're likely to see that it's in fact busy removing things.

0

Have you tried the following?

sudo rm -rfv /path/to/directory_to_delete

This will run rm as root; delete recursively; ignore errors and permissions (even if files don't exist), and explain what is being done.

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.