Score:0

Cannot remove non-empty dir with rm -rf

kh flag

I try to remove directories that contain files in the command line by using rm -rf dir1. However,I receive error message telling

rm: cannot remove 'dir1': Directory not empty

Any ideas how to solve?

Terrance avatar
id flag
Possible answers: https://askubuntu.com/questions/566474/why-do-i-get-directory-not-empty-when-i-try-to-remove-an-empty-directory?rq=1
Score:3
kh flag

found the solution. A file called fuse_hidden produced the issues. I wasn't able to delete that file, even in not by rightclicking and deleting.

I used lsof dir/fuse_hidden to show processes using this file and closed them. After that I rm -rf was possible.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.