搜尋home目錄下有沒有檔案裡面包含jni
grep -roin jni ~/*
-r代表遞迴式搜尋
-i 忽略大小寫
-n 顯示行數
-o 只顯示match到的字串
grep: /home/nelsonchung/Android/packages/apps/CertInstaller/.git/packed-refs: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/DeskClock/.git/rr-cache: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/DeskClock/.git/svn: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/DeskClock/.git/packed-refs: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/SpeechRecorder/.git/rr-cache: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/SpeechRecorder/.git/svn: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/SpeechRecorder/.git/packed-refs: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/Browser/.git/rr-cache: 沒有此一檔案或目錄
二進位格式檔案 /home/nelsonchung/Android/packages/apps/Browser/.git/index 符合
grep: /home/nelsonchung/Android/packages/apps/Browser/.git/svn: 沒有此一檔案或目錄
grep: /home/nelsonchung/Android/packages/apps/Browser/.git/packed-refs: 沒有此一檔案或目錄
二進位格式檔案 /home/nelsonchung/Android/packages/apps/Browser/.git/objects/pack/pack-d51cce064f499f5130215881f2e2a18bb13982d0.pack 符合
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:6:JNI
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:10:JNI
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:14:JNI
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:18:JNI
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:35:JNI
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:39:JNI
/home/nelsonchung/Android/packages/apps/Browser/tests/assets/bindings_test.html:53:JNI
可是不想讓找不到的出現
也就是不想要讓"沒有此一檔案或目錄"出現
該怎麼辦呢?
-o好像沒有用
1 則留言:
將結果做>導向到檔案中
就不會有上述問題
grep -roin jni ~/* > result.txt
result.txt就只會有搜尋到的結果
張貼留言