LoginSignup
1
0

More than 3 years have passed since last update.

Linuxで 特定文字列を含むファイルを一括して処理したい

Last updated at Posted at 2018-07-09

$(grep -l 文字列 ファイル名) を引数にする

例)
「testという文字列が含まれるカレントディレクトリのファイル」を
上位のhogeフォルダに移動させたい場合は

mv $(grep -l test *) ../hoge
1
0
0

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
1
0