Mercurial > hg > Document > Growi
changeset 18:46800d30a182
backup 2021-01-07
author | autobackup |
---|---|
date | Thu, 07 Jan 2021 00:10:03 +0900 |
parents | 4d2f07e4f23e |
children | ac8a0febc79b |
files | user/anatofuz/note/2021/01/06.md user/matac42/note/2021/01/06.md |
diffstat | 2 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/user/anatofuz/note/2021/01/06.md Thu Jan 07 00:10:03 2021 +0900 @@ -0,0 +1,34 @@ +# 2021/01/06 + +# fdを使ったファイル検索 + +- `genrate_stub.pl`がデフォルトで作りに行くゴミファイルを消す + - `hoge.c.\d`みたいな命名規則 +- `-a`オプションで正規表現でfind出来る + +```shell +$ fd -a 'c\.\d$' +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.1 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.2 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.3 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.4 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.5 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.6 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.7 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.8 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/CUDAWorker.c.9 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.1 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.2 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.3 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.4 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.5 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.6 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.7 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.8 +/home/anatofuz/src/firefly/hg/Gears/Gears/src/parallel_execution/examples/pop_and_push/main.c.9 +``` + +```shell +$ fd -a 'c\.\d$' | xargs rm +$ fd -a 'c\.\d$' +```