bash - Change spaces with underscore in filename -
i have multiples files space, , want replace underscore command line (mac)
xxx xxx.jpg -> xxx_xxx.jpg
it's possible line command?
for files in current directory
for in *;do mv "$i" "${i// /_}";done
if want match files spaces (to prevent tons of error messages when tries move files themselves) though use extended glob
shopt -s extglob in +(* *);do mv "$i" "${i// /_}";done
Comments
Post a Comment