find + grep 用法 - Linux

Tristan Cohan avatar
By Tristan Cohan
at 2012-06-30T03:59

Table of Contents

幫翻譯:

On Jun 16, 12:42 am, [email protected] (yshihyu) wrote:
> 我想先用 find . -name -type d "aaaa"
>
> 找到"aaaa" 關鍵字目錄...之後在每個目錄底下找所有java code *.java
>
> 中程式碼中有沒有"bbbb" 字串
>
> 請問這樣指令要如何下? 就是先找到aaaa目錄路徑後搜尋目錄底下所有*.java 中
>
> 有沒有"bbbb"字串存在

要不要:

find . -type d -name aaaa -exec find '{}' -name \*.java \; | xargs
grep bbbb

>
> 謝謝
>
> --
Tags: Linux

All Comments

Thomas avatar
By Thomas
at 2012-07-02T20:56
我一直以為是廣告信...
Rebecca avatar
By Rebecca
at 2012-07-04T07:40
base64
Christine avatar
By Christine
at 2012-07-07T12:02
感謝幫忙

可以這樣操作嗎

Zora avatar
By Zora
at 2012-06-30T03:57
幫翻譯: On Jun 27, 3:05 pm, knives....atptt.cc () wrote: andgt; 我查了一下ps -C and#39;執行的命令and#39;這個參數可以取得 引號內所執行的命令的pid andgt; andgt; 像有的時候,它會找到多筆pid andgt; and ...

gnuplot使用using $1:$2出問題

Tristan Cohan avatar
By Tristan Cohan
at 2012-06-30T03:55
幫翻譯: On Jun 27, 5:14 pm, k770618x....atptt.cc (tim845487) wrote: andgt; 大家用gnuplot有遇過這個問題嗎 andgt; 我的gnuplot using $1:$2 這個部分竟然不能用 andgt; ex: andgt; plot a ...

用ArchLinux的ABS編譯Firefox 13.0.1

Zora avatar
By Zora
at 2012-06-29T22:15
※ 引述《zerotech (Long Night...)》之銘言: : ABS把編譯用的相關檔案都整理好了,我只要打個makepkg -s的指令就好。 : 主要是想編譯一個對應自己的CPU版本,不過卻總是卡在一個地方 : localhost.localdomain - - [29/Jun/2012 11:0 ...

bash的例子

Frederica avatar
By Frederica
at 2012-06-29T20:24
以前看了網路上用bash寫的俄羅斯方塊 http://ideone.com/y3NKF 就仿造寫了一些script,如果有興趣的可以拿去看看。 有問題大家也以討論一下。 listview http://ideone.com/hkz4Q 4X4數字拼盤 http://ideone.com/Awgh9 ...

有無將WinXP分割區搬至vbox的快速方式?

Frederica avatar
By Frederica
at 2012-06-29T19:12
※ 引述《鵟.騎士 andlt;nowayatfakemail.organdgt;, 看板: Linux》之銘言: : 於 西元2012年05月29日 17:28, BIT一生 提到: : andgt; 想把舊筆電現狀原封不動搬到virtual box 虛擬機器中,舊筆電就隨時可以 : andgt; ...