标签:pts find命令详解 ssi read 显示 exec amp scripts check
解释:find - search for files in a directory hierarchy
用法:Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[root@zabbix scripts]# find /server/scripts/
/server/scripts/
/server/scripts/test1.sh
/server/scripts/1
/server/scripts/c_args.sh
/server/scripts/c_vars.sh
/server/scripts/c_read.sh
/server/scripts/aa
/server/scripts/lamp.sh
/server/scripts/menu.sh
/server/scripts/judge_system_mem.sh
/server/scripts/check_web.sh
/server/scripts/com_if.sh
要执行时,只需要交给bash就可以:find /server/scripts/ |xargs md5sum|bash
[root@zabbix scripts]# find /server/scripts/ |xargs md5sum
md5sum: /server/scripts/: Is a directory
9d2de0fe1d6a415e87656e0b7aeeabff /server/scripts/test1.sh
d41d8cd98f00b204e9800998ecf8427e /server/scripts/1
738a54bab35dc027e6a8a5d82ef3ba6f /server/scripts/c_args.sh
738a54bab35dc027e6a8a5d82ef3ba6f /server/scripts/c_vars.sh
5f6295bdaa1e2ca989ddedb8f8cdc77d /server/scripts/c_read.sh
597df6cb3d430e5bb276cf18bd2112f1 /server/scripts/aa
9f8af9a257536cb1e41e48df6e98a100 /server/scripts/lamp.sh
eaf58b51850ea72c8ac0a85179a075fd /server/scripts/menu.sh
8462deda79cb774f7b6a43dd320a26b8 /server/scripts/judge_system_mem.sh
ec5552fa6189bad44ecf16e134cf4f42 /server/scripts/check_web.sh
3fc2f7cd9d5f5743a9a967b4fb44a1bb /server/scripts/com_if.sh
[root@zabbix scripts]# find /server/scripts/ -name "test1.sh"
/server/scripts/test1.sh
[root@zabbix scripts]# find /server/scripts/ -name "*t*.sh*"
/server/scripts/test1.sh
/server/scripts/judge_system_mem.sh
参数-type x
文件类型
[root@zabbix scripts]# find /server/scripts/ -type d
/server/scripts/
/server/scripts/moox
标签:pts find命令详解 ssi read 显示 exec amp scripts check
原文地址:https://www.cnblogs.com/moox/p/12808037.html