Unable to delete empty folder

Code:
[/var/tmp/test]# ls -la
total 8K
drwx------ 2 root wheel 1024 Nov 22 19:50 .
drwxrwxrwt 6 root wheel  512 Nov 30 18:31 ..

Code:
[/var/tmp]# rm -rf test/     
rm: test/: Directory not empty

Any idea how to solve this weird issue?
 
gkontos said:
Have you tried:

[CMD=""]# chflags -R noschg test/[/CMD]
[CMD=""]# rm -rf test/[/CMD]

Code:
[/var/tmp]# chflags -R noschg test/
[/var/tmp]# rm -rf test/
rm: test/: Directory not empty

No success. I can rename it but i can't remove it

Code:
[/var/tmp]# ls -la
total 24K
drwxrwxrwt  6 root    wheel  512 Nov 30 18:31 .
drwxr-xr-x 25 root    wheel  512 Nov 30 18:27 ..
srwxrwxrwx  1 ezyclie wheel    0 Nov 30 18:27 dbus-HyZGHnKjcg
drwx------  7 ezyclie wheel  512 Nov 30 18:28 kdecache-ezyclie
drwx------  2 kdm     wheel  512 Nov 30 18:27 kdecache-kdm
drwx------  2 ezyclie wheel  512 Nov 30 18:28 orbit-ezyclie
drwx------  2 root    wheel 1024 Nov 22 19:50 test
 
pbd said:
What was in that directory? Can some process, that opened file in it, be still running?

Its empty dir...

Code:
[/var/tmp]# ls -lod test
drwx------ 2 root 1024 Nov 22 19:50 test
 
alie said:
Its empty dir...
If a process has a file open in that directory and that file is deleted, the file isn't completely removed. You won't see it but it's still there.

Another possibility is a corrupt filesystem. I'd reboot the machine and do an fsck(8) on it. The reboot will also take care of the application that might still have an open filehandle.
 
SirDice said:
If a process has a file open in that directory and that file is deleted, the file isn't completely removed. You won't see it but it's still there.

Another possibility is a corrupt filesystem. I'd reboot the machine and do an fsck(8) on it. The reboot will also take care of the application that might still have an open filehandle.

I am able to rename it and i've tried fsck(8) too with single user mod... still no success
 
alie said:
I have to run single user mode without mount then fsck
Certain filesystem errors can't be fixed if the filesystem is mounted.
 
Back
Top