“非法选择"在 macOS 上使用 find 时出错 [英] "Illegal option" error when using find on macOS
本文介绍了“非法选择"在 macOS 上使用 find 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试仅列出末尾带有字母R"的文件.我在 macOS 终端中使用 find
如下,
I am trying to list the files only with the letter "R" at the end. I used find
as follows in macOS Terminal,
find -type f -name '*R'
但我收到消息说 illegal option --t
.
推荐答案
find
的第一个参数是它应该开始查找的路径.路径 .
表示当前目录.
The first argument to find
is the path where it should start looking. The path .
means the current directory.
find . -type f -name '*R'
您必须提供至少一个路径,但实际上您可以提供任意数量的路径:
You must provide at least one path, but you can actually provide as many as you want:
find ~/Documents ~/Library -type f -name '*R'
这篇关于“非法选择"在 macOS 上使用 find 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文