It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center。
我想删除一个包含多个子目录的目录中以“~”结尾的所有文件。
有什么安全的方法吗?
最佳答案
您可以尝试:
find <directory in question> -name "*~" -delete
其中
<directory in question>
应该是最上面的目录,在这里您可以说有很多子目录。关于regex - Linux Regex-删除文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15536956/