#author("2018-08-19T11:11:31+09:00","","")
#author("2018-10-08T08:30:03+09:00","","")
#nofollow
#norelated
総数:&counter(total); 今日:&counter(today); 昨日:&counter(yesterday);

* もくじ [#u140e48d]

#contents

* 指定日付以前の古いファイルを一覧する方法 [#u6948aff]
-例)50日以内の新しいファイルを一覧する
 $ find ./ -type f -mtime -50 -regex ".*\.txt\|.*\.sh" | xargs ls -1

* 特定のディレクトリを除外してファイルを一覧する方法 [#kf107465]
参考url: http://mollifier.hatenablog.com/entry/20090115/1231948700
-例) ./out/ と .git/ という名前のディレクトリを除外してファイルを一覧する
-例) ./out/ と .git/ という名前のディレクトリを除外してファイルを一覧す る
 $ find . \( -type d -and -regex ".*\.\/out" -and -prune \) -or \( -type d -and -regex ".*\/\.git" -and -prune \) -or \( -type f -print \)

* 特定のディレクトリを除外してファイルを一覧する方法 その2 [#v88e693f]
findeからgrep へpipeするとき、
|grep -a|バイナリファイルを除外というかテキストファイルとして検索|
|grep -s|「ディレクトリではありません」的なメッセージを除外|
-例) ./out/ ./prebuilt/ と .git/ という名前のディレクトリを除外してファイルを一覧する&br;
なおかつ、grepへpipeするとき、&br;
テキストファイルとして検索・「ディレクトリではありません」的なメッセージを除外、で&br;
apply_patch, block_image を見つける。&br;
 find . \( -type d -and -regex ".*\.\/out\|.*\.\/prebuilts" -and -prune \) -or \( -type d -and -regex ".*\/\.git" -and -prune \) -or \( -type f -print \) | xargs grep -s -a -ni --color -e "apply_patch\|apply_patch_check\|block_image\|block_image_verify\|block_image_update"

トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS