2012-02-10から1日間の記事一覧

CarbonEmacsでfindとgrepでのファイル検索

複数の拡張子を指定してサブディレクトリのファイルをgrepするコマンドの例。 2つの方法では、xargsを使うほうが速いらしい。 find . -type f -regex ".*[cpp|h]" -exec grep -nH -e "main" {} /dev/null \; find . -type f -regex ".*[cpp|h]" -print0 | xa…