LoginSignup
0
1

More than 5 years have passed since last update.

フォルダ内全てのファイルをmd5のハッシュ名に名前を変更する方法

Last updated at Posted at 2017-01-02
for fpath in $(find . -type f); do
  var_md5=$(md5sum $fpath | awk '{print $1}')
  var_extension=${fpath##*.}
  echo "rename $fpath to ${var_md5}.${var_extension}"
  mv $fpath ${var_md5}.${var_extension}
done
echo "rename done!"

参考サイト

0
1
1

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