View

Renaming a set of files

  1. # rename all .jpeg files to .jpg
  2. for file in *.jpeg; do mv $file ${file%.jpeg}.jpg; done
  3. # make all the files in the current directory lowercase
  4. for file in *; do mv $file $(echo $file | tr [[:upper:]] [[:lower:]]); done

You may also like