Find Files Containing Certain String Within a Folder:

# pwd
/root/testdir
echo "hello,123">> file1
echo "123">>file2
echo "test111 hello" >>file3

find ./ -type f -print0 | xargs -0 grep -i "hello"
./file1:hello,123
./file3:test111 hello


arrow
arrow
    全站熱搜

    DanBrother 發表在 痞客邦 留言(0) 人氣()