Thursday, 28 March 2019

1-liner bash to rename spaces in filenames or folder names

Source: https://stackoverflow.com/questions/2709458/how-to-replace-spaces-in-file-names-using-a-bash-script
#non-recursive method
for f in *\ *; do mv "$f" "${f// /_}"; done

No comments:

Post a Comment

Datanami, Woe be me