タグ

関連タグで絞り込む (2)

タグの絞り込みを解除

コマンドに関するsh19910711のブックマーク (2)

  • findコマンドで複数の名前条件を指定 - 日々の報告書

    何となく「codeなにがし」を見ていたところ、findコマンドを利用して複数の拡張しにマッチしたファイル一覧を取得する方法が書いてあった。 codeなにがし::linuxでテキストファイルだけをコピー 質問者は*.c *.cc *.h *.hhなどの拡張子を持つファイルの一覧を取得したいとのことで、このためには次のようにfindを実行すればよいそうな(一部省略)。 $ find . \( -name \*.c -o -name \*.cc -o -name \*.h -o -name \*.hh \) -print 「-name」オプションは検索対象のファイルの名前を指定するオプション。これをORを意味する「-o」オプションで複数つなげることで、複数の拡張子のどれか1つにマッチするファイルを見つけ出すことができる。ちなみに「-o」は「-or」とも書ける。 僕も以前似たようなことをしたことが

    findコマンドで複数の名前条件を指定 - 日々の報告書
  • tsuchinokopro.com

    tsuchinokopro.com 2018 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy

  • 1