The Archives

  • 30.Nov.09
    Changing file extension shell | rafacas | (0)
    I usually change the annoying JPG extension to jpg (I do not like uppercase file names or extensions). For this I use a function I found in shell-fu: rename_ext() { local filename for filename in *."$1"; do mv "$filename" "${filename%.*}"."$2" done } I copied it into my .bashrc file, so that I use it as follows: $ rename_ext JPG jpg