Linux 无法删除文件 [英] Linux can't delete files
本文介绍了Linux 无法删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在找到文件时遇到了删除文件的问题.任务:必须找到带空格的文件并删除它们
I have a problem with removing files when I find them. Task : must find files with spaces and remove them
我的尝试:)
rm $(find -L /root | grep -i ' ')
但我有错误:
rm: cannot remove `/root/test': No such file or directory
rm: cannot remove `2.txt': No such file or directory
rm: cannot remove `/root/test': No such file or directory
rm: cannot remove `3.txt': No such file or directory
rm: cannot remove `/root/test': No such file or directory
rm: cannot remove `1.txt': No such file or directory
请帮助解决这个问题.
谢谢.
推荐答案
为什么不这样:
find /root -type f -name '* *' -exec rm -f {} ';'
这篇关于Linux 无法删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文