Created
November 24, 2011 12:15
-
-
Save nuna/1391222 to your computer and use it in GitHub Desktop.
カレントディレクトリ以下のthumnailとミススペリングしているファイルをthumbnailに直す
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# まず 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