简体   繁体   English

Linux Find命令挂起

[英]Linux Find command hangs

The find command is as below: find命令如下:

find / -path "/proc/*" -prune -o -iname " core. "|grep -i "core\\.[0-9]"|grep -v "\\.gz"|grep -v "/man/" 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. 但是在另一个实验室里,它会持续超过1小时。

Checked the output of "top" and "iostat -x -k" in that lab. 在该实验室中检查了“top”和“iostat -x -k”的输出。 The CPU and I/O load on that lab looks normal, but the find command is in S status. 该实验室的CPU和I / O负载看起来正常,但find命令处于S状态。

------------top------------- - - - - - - 最佳 - - - - - - -

4203 root 15 0 652m 500m 636 S 9.7 1.6 148:34.69 find 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 [root @tt-na01-as01 export] #ll

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

The directory is so huge that even 'ls' and 'rm' commands hang. 该目录非常庞大,即使是'ls'和'rm'命令也会挂起。

Any suggestion on how to delete huge directory? 关于如何删除巨大目录的任何建议?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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