Skip to content

Instantly share code, notes, and snippets.

@nuna
Created November 24, 2011 12:15
Show Gist options
  • Save nuna/1391222 to your computer and use it in GitHub Desktop.
Save nuna/1391222 to your computer and use it in GitHub Desktop.
カレントディレクトリ以下のthumnailとミススペリングしているファイルをthumbnailに直す
# まず dry run
$ find . -name thumnail.png | ruby -rfileutils -ne '$_.chomp!; FileUtils.mv($_, $_.sub(/thum/, "thumb"), {:noop => true, :verbose => true})'
# 本当に実行
$ find . -name thumnail.png | ruby -rfileutils -ne '$_.chomp!; FileUtils.mv($_, $_.sub(/thum/, "thumb"), {:noop => false, :verbose => false})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment