Skip to content

rm -rf on a directory that is not empty fails #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mkieboom opened this issue Sep 27, 2016 · 1 comment
Open

rm -rf on a directory that is not empty fails #51

mkieboom opened this issue Sep 27, 2016 · 1 comment

Comments

@mkieboom
Copy link

mkieboom commented Sep 27, 2016

Steps to reproduce:

Create a subfolder (works fine)
[mapr@maprdemo source1]$ mkdir subfolder1

Remove an empty subfolder using rmdir (works fine)
[mapr@maprdemo source1]$ rmdir subfolder1/

Create a subfolder (works fine)
[mapr@maprdemo source1]$ mkdir subfolder2
Add a file into the subfolder (works fine)
[mapr@maprdemo source1]$ echo "abc" >> subfolder2/abc.txt

Remove a not-empty subfolder using rm -rf (FAILS)
[mapr@maprdemo source1]$ rm -rf subfolder2/
rm: cannot remove `subfolder2': Directory not empty

[mapr@maprdemo source1]$ ls -al subfolder2/
total 2
drwxrwxr-x 2 mapr mapr 1 Sep 27 01:22 .
drwxr-xr-x 3 mapr mapr 2 Sep 27 01:22 ..
-rw-rw-r-- 1 mapr mapr 16 Sep 27 01:22 .nfs0000000018756c2300000001

Looks like the .nfs file is blocking the rm -rf to remove the directory.

@tgrall
Copy link
Contributor

tgrall commented Sep 27, 2016

Related to this:
http://nfs.sourceforge.net/#faq_d2

ideally, we need to find a way to solve that without restarting the process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants