**Bash + basic Linux commands 98**

for file in $(ls -R)
do export newfile=echo $file|sed s/' '/'_'/g
mv $file $newfile
done