linux find

 

[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]# 

 

發佈了95 篇原創文章 · 獲贊 12 · 訪問量 1萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章