2021/01/06

2021/01/06

# fdを使ったファイル検索

  • genrate_stub.plがデフォルトで作りに行くゴミファイルを消す
    • hoge.c.\dみたいな命名規則
  • -aオプションで正規表現でfind出来る
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
$ 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
1
2
$ fd -a 'c\.\d$' | xargs rm
$ fd -a 'c\.\d$'
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy