find命令用來在指定目錄下查找文件.json
find path -option [-print] [-exec -ok command] {}\;
複製代碼
find ./*.ts
複製代碼
find ./ -name "*.ts"
find ./ -iname "*.ts" # 忽略大小寫
複製代碼
find ./ -name "*.js" -o -name "*.sh" -o -name "*.json"
複製代碼
find . -regex ".*\(\.js\|\.json\)$"
find . -iregex ".*\(\.js\|\.json\)$"
複製代碼
find ./ ! -name "*ts*"
複製代碼
find ./ -type d
複製代碼
find ./ -type f
複製代碼
find ./ -name "*.sh" ! -path "*test*"
複製代碼
find ./ -name "*.js" -exec rm {} \;
複製代碼