Skip to contentSkip to conversation

Empty directory can't be removed, "not empty"

DISCUSSION Roman Mamedov 2 participants 2 messages Oct 5, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello,

After an improper shutdown (power loss), I got one of these again:

# ls -la junk/
total 0
drwx------ 1 rm   rm   4152 Oct  5 18:44 .
drwxr-xr-x 1 root root   72 Oct  5 19:10 ..
# rm -rvf junk/
rm: cannot remove `junk': Directory not empty

The kernel version is 3.4.18.
If this helps, initially it was a Chromium browser profile directory; and it had nodatacow files in it (chattr +C).
How to actually remove this directory now?

Signature · 2 lines
With respect,
Roman
#1 lore raw

Fsck will fix it, its a bug from way back when. Thanks,

Josef

Roman Mamedov <[email protected]> wrote:

Hello,

After an improper shutdown (power loss), I got one of these again:

# ls -la junk/
total 0
drwx------ 1 rm   rm   4152 Oct  5 18:44 .
drwxr-xr-x 1 root root   72 Oct  5 19:10 ..
# rm -rvf junk/
rm: cannot remove `junk': Directory not empty

The kernel version is 3.4.18.
If this helps, initially it was a Chromium browser profile directory; and it had nodatacow files in it (chattr +C).
How to actually remove this directory now?

--
With respect,
Roman