Linux Find command hangs

The find command looks like this:

find / -path "/ proc / *" -prune -o -iname "core." | grep -i "core \. [0-9]" | grep -v "\ .gz" | grep -v "/ person /"

It works well in our many laboratories, completed within minutes. But in another laboratory it hangs for more than 1 hour.

Checked the output of "top" and "iostat -x -k" in this lab. CPU and I / O load looks fine in this lab, but find command is in S state .

------------ top -------------

4203 root 15 0 652 m 500 m 636 S 9.7 1.6 148: 34.69 find


Any idea / idea is appreciated.

+3


source to share


1 answer


I found the root cause. This is caused by an extremely huge catalog.

[root @ tt-na01-as01 export] # ll

drwxrwxr-x 2 system sysop 756490240 November 5 16:24 com.nsn.app.nbm.pm3gpp-1



The directory is so large that even the "ls" and "rm" commands freeze.

Any suggestion on how to delete the huge directory?

+1


source







All Articles