Canīt remove directory with rm -rf [Directory not empty]
Trying to delete folder 28.
But I can't delete it. here is what i tried. Code:
[core-ssh 01]$ ls -all |
Use ls -a and you should find that there are some hidden files and/or directories in there.
Anything with a "." was the first character of the name is ordinarily hidden. |
Quote:
A few possibilities:
|
Quote:
|
It could be a mountpoint - what does mount say?
|
Tried your suggestions, here is the result.
sundialsvcs Quote:
Code:
[core-ssh 28]$ ls -a rknichols Quote:
Code:
[core-ssh 28]$ type ls rknichols Quote:
Code:
[core-ssh 28]$ fsck TB0ne Quote:
Code:
[core-ssh 01]$ rm -fR 28 lvm_ Quote:
Code:
[core-ssh 01]$ mount |
I guess you need to go into that dir and check the content. sometimes rm cannot remove files, because of insufficient permissions.
|
Quote:
How do I find those files? when ls ls -a ls -all can't find any files in that dir. is there another command to find files that are hidden? |
se answer above!
trying to delete this post but cant find the button ^^ sorry |
in that case probably you have no right to remove that directory itself.
you might try: Code:
strace -o /tmp/strace.txt rm -rf <dir> |
Is this on a local computer? Which Linux distribution are you using? This is always useful information to post in a new thread as there are probably over 1,000 different Linux distributions.
Where in the directory tree is this directory located? Do you get the same error message when you try to remove it when logged in as root? I don't know why you get the error you do as I would expect a 'permission denied' since the directory owner:group are clearly root:root and you are logged in as a user. I noticed 'overlay' in the output of your mount command so might I suggest that you take a look at the link below to familiarize yourself. https://www.kernel.org/doc/html/v5.8...overlayfs.html |
NOTE I am not familiar with this problem. But yancek may be on the right track. A Google search for the terms
"docker" "overlay" "directory not empty"digs up a lot of dirt, including kernel driver issues. As such I am not so sure this is a "Linux - Newbie" question. You might get more traction over at "Linux - Containers". |
thank you for your commitment.
the problem is solved!! After a total shutdown of the server, the problem disappeared. Previously tried just reboting, but that didn't help. The Linux "distro" is -> Home Assistant Operating System. runnin in VirtualBox. |
I'm glad to see you got your problem solved and would suggest that in the future, posting here or any other forum you provide more information at the start to get help. In addition to answers to the questions I asked in my earlier post, it would have been quite helpful to indicate you were using virtualization software and particularly which 'Linux' you are using, particularly when it is something as obscure as your "home assisteant". Is the link below to the software you are using? If so, posting the link would have been helpful.
https://www.home-assistant.io/installation/linux/ |
All times are GMT -5. The time now is 10:10 AM. |