谁能推荐一种安全的解决方案,从给定的根目录开始,用文件名和目录名中的下划线递归替换空格?例如:
$ tree
.
|-- a dir
| `-- file with spaces.txt
`-- b dir
|-- another file with spaces.txt
`-- yet another file with spaces.pdf
变成:
$ tree
.
|-- a_dir
| `-- file_with_spaces.txt
`-- b_dir
|-- another_file_with_spaces.txt
`-- yet_another_file_with_spaces.pdf
素胚勾勒不出你