First, make sure you are on the right directory on mac terminal app. If you want to change only jpg files you can use $ for f in *.JPG; instead of $ for f in *; Renaming to lowercase $ for f in *; do mv "$f" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done Replacing spaces in file names to hyphens