Linux 查找命令 find如何用名字找到文件

find path -option [ -print ] [ -exec -ok command ] {} ;

举个例子。
查找u01文件夹下的admin文件夹
find u01 -name admin
u01是要查询的目录
-name 是指按照文件名查找
-admin 是要查找的文件名, 也可以模糊查询譬如 ad*
-下面是查找结果=========
u01/app/oracle/admin
u01/app/oracle/product/11.2.0/db_1/inventory/Templates/md/admin
u01/app/oracle/product/11.2.0/db_1/inventory/Templates/ord/im/admin
u01/app/oracle/product/11.2.0/db_1/inventory/Templates/ord/admin
u01/app/oracle/product/11.2.0/db_1/inventory/Templates/hs/admin
u01/app/oracle/product/11.2.0/db_1/inventory/Templates/owb/wf/admin
u01/app/oracle/product/11.2.0/db_1/inventory/Templates/ctx/admin
u01/app/oracle/product/11.2.0/db_1/dv/admin
u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/oc4j_applications/applications/em/em/admin
u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/oc4j_applications/applications/em/em/webapp/admin
u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/oc4j_applications/applications/em/em/monitoring/host/admin
u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/oc4j_applications/applications/em/em/euser/admin
u01/app/oracle/product/11.2.0/db_1/md/admin
u01/app/oracle/product/11.2.0/db_1/sqlplus/admin
u01/app/oracle/product/11.2.0/db_1/xdk/admin
u01/app/oracle/product/11.2.0/db_1/precomp/admin
u01/app/oracle/product/11.2.0/db_1/wwg/admin
u01/app/oracle/product/11.2.0/db_1/srvm/admin
u01/app/oracle/product/11.2.0/db_1/network/admin
u01/app/oracle/product/11.2.0/db_1/cv/admin
u01/app/oracle/product/11.2.0/db_1/mgw/admin
u01/app/oracle/product/11.2.0/db_1/javavm/admin
u01/app/oracle/product/11.2.0/db_1/sysman/admin
u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/sql/core/latest/admin
u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/sql/core/latest/host/admin
u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/sql/core/10.2.0.4/admin
u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/sql/core/v102010/host/admin
u01/app/oracle/product/11.2.0/db_1/ldap/admin
u01/app/oracle/product/11.2.0/db_1/plsql/admin
u01/app/oracle/product/11.2.0/db_1/ord/im/admin
u01/app/oracle/product/11.2.0/db_1/ord/admin
u01/app/oracle/product/11.2.0/db_1/olap/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/target/groups/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/paf/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/gensvc/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/webapp/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/monitoring/host/admin
u01/app/oracle/product/11.2.0/db_1/j2ee/OC4J_EM/applications/em/em/provision/admin
u01/app/oracle/product/11.2.0/db_1/hs/admin
u01/app/oracle/product/11.2.0/db_1/rdbms/admin
u01/app/oracle/product/11.2.0/db_1/owb/bin/admin
u01/app/oracle/product/11.2.0/db_1/owb/wf/adm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值