[Ubuntu-zh] 如何通过 rm, locate 或 find 命令批量删除文件? (文件名中包含空格)

Woodz free4537在qq.com
星期六 六月 1 10:48:09 UTC 2013


以关键字 Tamas Wells 为例, 尝试了 sudo locate -i *tamas*wells* | xargs rm -rf  或  sudo rm -rf `locate -i *tamas*wells*` 都不行.但 locate -i *tamas*wells* 能搜到以下文件:


/mnt/else/music/杂/Tamas Wells - From Prying Plans Into The Fire.flac
/mnt/else/music/杂/Tamas Wells - Melon Street Book Club.flac
/mnt/else/music/杂/Tamas Wells - The Opportunity Fair.flac
/mnt/else/music/杂/Tamas Wells - Valder Fields.flac
/mnt/else/music/杂/Tamas Wells - Vendredi.flac



应该是文件名中包含空格的缘故吧? 如何解决?
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: <https://lists.ubuntu.com/archives/ubuntu-zh/attachments/20130601/5ce899e5/attachment.html>


More information about the ubuntu-zh mailing list