LoginSignup
6
9

More than 5 years have passed since last update.

Linuxで、ファイル名、ディレクトリ名を一括で置換する方法

Last updated at Posted at 2016-03-02

ファイル名の一括置換
for f in $(find . -name "検索したい名前(正規表現で)" -type f); do mv "$f" "${f//変えるもと/変えるさき}"; done;

ディレクトリ名の一括置換
for f in $(find . -name "検索したい名前(正規表現で)" -type d); do mv "$f" "${f//変えるもと/変えるさき}"; done;

6
9
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
6
9