Bash can do sed-like substitutions: for file in *; do mv “${file}” “${file/000/}”; done