how to use find command in adb shell

倾然丶 夕夏残阳落幕 提交于 2019-12-05 05:32:58

Find command is not supported in adb shell. This command will also show you hidden files adb shell ls -laR | grep filename

I am afraid that the Android emulator does not provide with the 'find' program.

The find command is supported in Android since version 6.0 (Mashmallow).

This is because it's including Toybox since then.

https://en.wikipedia.org/wiki/Toybox

When you know the exact file name you do not need to use any extra commands like find to look for it. Simply check if it exists using built-in shell facilities:

adb shell "[ -f /mnt/sdcard/koinoxrista/Bill.txt ] && echo 'found'"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!