找出符合指定字串的全部檔案

從資料夾 /home/ubuntu/Documents 底下找出符合字串 Hello World! 的檔案,並顯示該字串在哪一行出現。

$ grep -R -n 'Hello World!' /home/ubuntu/Documents

This entry was posted in 東搞一下,西搞一下 and tagged . Bookmark the permalink.

發表迴響

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

連結到 %s