Here's the situation. I have a program running on Fedora 8 which creates a folder and saves some files in it. After a certain amount of time it will then delete this folder using the command:
rm -rf [folder name]
There's no problem with the logic of the program and it works well 99% of the time. However, I recently encountered a problem where the deleting of the folder encountered this error message:
rm: cannot remove directory `[folder name]': Directory not empty
Looking in the folder with ls shows that the folder is empty. Using the command ls -fl shows me this:
drwxr--r-- 2 root root 135168 2009-04-15 02:13 .
drwxrwxrwt 13 root root 4096 2009-04-15 01:51 ..
drwxr--r-- 2 root root 135168 2009-04-15 02:13 .
drwxrwxrwt 13 root root 4096 2009-04-15 01:51 ..
I'm thinking that I'm getting an error deleting this folder because of the duplicate . and ..
So now I'm wondering how this could have happened and how I can delete the folder.
I've tried following the different ways to delete the folder in the link below but still can't.
http://www.labtestproject.com/linuxcmd/rm.html
Any help would be appreciated.