9
9

More than 5 years have passed since last update.

コマンドラインならファイルの検索がこんなに簡単に! (zsh編)

Posted at

引数が多くて機能を把握できないfind。
でも大丈夫、zshがあればそんなの覚えなくても簡単!

  • 現在のディレクトリ以下のPDFファイルを一覧する
ls **/*.pdf
  • あるディレクトリ(dir1)以下にあるであろうファイル(func1.cpp)を探す
ls dir1/**/func1.cpp
  • 現在のディレクトリ以下のソースファイルから特定の関数名を探す
grep "func1" **/*.cpp
  • ゴミファイル(func.cpp~とかのバックアップファイル)を削除する
rm **/*~
9
9
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9