LoginSignup
40
25

More than 5 years have passed since last update.

Sed でファイル名と内容を一括置換

Last updated at Posted at 2016-05-16

2016aaahoge1~10.txt を 2016bbbhoge1~10.txt に
フォルダ内ファイル名を一括置換

find ./ -type f | sed 'p;s/aaa/bbb/' | xargs -n2 mv

フォルダ内ファイルの中身を一括置換
(192.168→210.11に)

find ./ -type f | xargs sed -i 's/192.168/210.11/g'
40
25
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
40
25