I have a number of files in a folder, and I want to replace every space character in all file names with underscores. How can I achieve this?
Here is another solution:
ls | awk '{printf("\"%s\"\n", $0)}' | sed 'p; s/\ /_/g' | xargs -n2 mv