for file in a_dir/*; do name="${file/test/verify}" mv "$file" "$newname" done Post navigation Copy only the specified number of images using bash scriptError: System limit for number of file watchers reached when you launch JavaScript project