Skip to content

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

Open
@mkieboom

Description

@mkieboom

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions