Question : remove spaces from file names bash
Answered by : grieving-grivet-dytig2sn9ccf
find . -name "* *" -type d | rename 's/ /_/g' # do the directories first
find . -name "* *" -type f | rename 's/ /_/g'
Source : https://stackoverflow.com/questions/2709458/how-to-replace-spaces-in-file-names-using-a-bash-script | Last Update : Sun, 29 Aug 21
Question : how to remove all space in file
Answered by : colorful-crocodile-b65im0tu1kmc
cat file.txt | tr -d " \t\n\r"
Source : https://stackoverflow.com/questions/9953448/how-to-remove-all-white-spaces-from-a-given-text-file | Last Update : Mon, 13 Jul 20
Question : linux cli remove space from filename
Answered by : steamboatid
{"tags":[{"tag":"textarea","content":"for f in *\\ *; do mv \"$f\" \"${f\/\/ \/_}\"; done","code_language":"shell"}]}
Source : https://stackoverflow.com/questions/2709458/how-to-replace-spaces-in-file-names-using-a-bash-script | Last Update : Wed, 23 Aug 23