bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm: cannot remove directory `coreutils-7.3/lib': Directory not empt


From: l l
Subject: Re: rm: cannot remove directory `coreutils-7.3/lib': Directory not empty
Date: Thu, 7 May 2009 23:05:44 +0900

Ah!, one more strange thing is
Before coreutils-7.3 installation, it easily removed.
bash-4.0$ rm -rf coreutils-7.3
bash-4.0$

But after installation, only i couldn't removed it.

bash-4.0$ rm -rf coreutils-7.3/
rm: cannot remove directory `coreutils-7.3/lib': Directory not empty

and  '.' dir size

bash-4.0$ ls -la (abnormal)
total 28
drwxrwxr-x 4 user user 24576 2009-05-07 22:48 .
drwxrwxr-x 3 user user  4096 2009-05-07 22:48 ..


bash-4.0$ ls -la (normal)
total 8
drwxrwxr-x 2 user user 4096 2009-05-07 22:58 .
drwxrwxr-x 4 user user 4096 2009-05-07 22:58 ..


> This strace output is consistent with what you've been reporting:
> [though the two consecutive "close(4) = 0" lines are odd.
>  Did you edit the output? ]

Yes. copy and paste. and  copy mistake.

>
>> execve("/bin/rm", ["rm", "-rf", "coreutils-7.3"], [/* 34 vars */]) = 0
> ...
>> openat(3, "lib", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW) = 4
>> getdents64(4, /* 2 entries */, 4096)    = 48
>> getdents64(4, /* 0 entries */, 4096)    = 0
>> fcntl(4, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
>> openat(4, "..", O_RDONLY)               = 3
>> close(4)                                = 0
>>
>> close(4)                                = 0
>> fstat(3, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
>> unlinkat(3, "lib", AT_REMOVEDIR)        = -1 ENOTEMPTY (Directory not empty)
>
> rm found lib/ to be empty, yet an attempt to unlink it failed with ENOTEMPTY.
>
> So maybe something created a file in lib/ between the getdents64
> and unlinkat calls.
>
> If you have root access, try running lsof (look up options)
> to see if any files under your coreutils-7.3/lib directory are open.
>
> And I should have asked before: what distro, kernel and libc versions
> are you using?
>

i couldn't use lsof.

LFS64: LinuxFromScratch for AMD64
Kernel:
Linux lfs64 2.6.30-rc4-git1 #2 SMP PREEMPT Mon May 4 07:03:54 KST 2009
x86_64 GNU/Linux
Libc: 2.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]