I create centos with docker and After I start the container, I would remove a directory where there are other two directories.
and I do :
rm -f -r ./folder
and I obtain:
cannot remove 'folder': Device or resource busy
Anyone can help me?
if you use windows, it's com.docker.backend.exe , terminate it, everything will ok.
If you know the reason why backend cause this problem, tell me.
Another pretty much simple answer is following:
1. Close all your terminal windows (bash, shell, etc...)
2. Start a new terminal
3. Execute your command again e.g.:
rm -f -r ./folder
4. done
Hopefully it helps others!
Maybe you have that folder opened up somewhere. Try lsof to find the opened folder and then sudo kill <pid>. Afterwards, I believe you can remove the folder from there.