简体   繁体   中英

Linux Find command hangs

The find command is as below:

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

It works well in our many labs, finished within a few minutes. But in another lab, it hangs over 1 hour.

Checked the output of "top" and "iostat -x -k" in that lab. The CPU and I/O load on that lab looks normal, but the find command is in S status.

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

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


Any hint/idea is appreciated.

I have found the root cause. It's caused by a extremely huge directory.

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

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

The directory is so huge that even 'ls' and 'rm' commands hang.

Any suggestion on how to delete huge directory?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM