linux find

余生长醉 提交于 2020-02-08 17:37:32

 

[root@k8s-master test2]# ll
总用量 8
-rw-r--r--. 1 root root 11 2月   8 16:32 test1.txt
-rw-r--r--. 1 root root 36 2月   8 16:34 test2.txt
[root@k8s-master test2]# find . -type f -name '*1.txt'
./test1.txt
[root@k8s-master test2]# find . -type f -name '*.txt'
./test1.txt
./test2.txt
[root@k8s-master test2]# find . -type f -name '*.txt' print0
find: 路径必须在表达式之前: print0
用法: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[root@k8s-master test2]# find . -type f -name '*.txt' -print0
./test1.txt./test2.txt[root@k8s-master test2]# find . -type f -name '*.txt' -print
./test1.txt
./test2.txt
[root@k8s-master test2]# 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!