>I've made a script :
>
>while true
>do
>mkdir 1
>cd 1
>done
>
>and executed in my /tmp directory
>so I've ????? thousands of subdirectories
>
>When I do
>rm -rf 1, it say
>1/1/1..../1 Directory not empty" for the last directory !
>1/1/...1/directory not empty and for each directory the same."
>1/...1/ directory not empty"...
The length of path string in rm is limited. if directory
is too deep, rm will not work well. you can try write a
simply C program to do this.
#include <unistd.h>
main()
{
while(chdir("1")==0);
chdir("..");
while(rmdir("1")==0)
{
chdir("..");
}
}
It can delete directory which have 20000 layer subdir.
>
>How to delete the folders ?
>Any Idea
>
Yu Xin
Oct 31,1998