“-r还需要-f”logcat上的错误,但我传递了-f

时间:2017-10-25 23:53:42

标签: android android-4.4-kitkat

我正在尝试在kitkat手机上运行logcat而我收到错误,这是命令和输出:

shell@falcon_cdma:/sdcard/Download $ logcat -n 2 -r 4096 -f "test.log"     
-r requires -f as well
Usage: logcat [options] [filterspecs]
options include:

因为你可以看到我传递“test.log”作为文件名。我试过没有引号,绝对路径和我继续得到那个错误。

感谢。

1 个答案:

答案 0 :(得分:0)

我提出的问题的命令并不起作用,但是这个命令有效:

logcat -n 2 -f "test.log" -r 4096

所以基本上-r必须在-f之后。