-3

I tried to find in Android source code on github, but I didn't find the implementation of the find command any where.

Can some one tell me where it is.

Thanks.

EDIT: An out-of-box Android provides no find command. What is needed is some source code that implements find so that it can be run on Android. Ideally, an answer should give us some source code that may be modified if necessary, but pointers to already compiled binaries are also relevant. Replacement scripts are also welcome.

Useful link: man find (the man page for the find command). Android is a Linux whose command line shell is available via adb shell. Shell script writers usually assume that the find command is available (which is true on most platforms, but not on Android).

EDIT2 (in fact, this should be one of possible answers, but the question is already closed):

A lightweight implementation of find may be found here.

9
  • how do you find a file in Linux? you tried to do something like this before? find / -name xxxyyy.zzz Is it clearer to you? If you are not sure what it is, please don't downvote me, thanks. Commented Sep 18, 2012 at 4:06
  • @ViVi I didn't personally downvote you, but your questions wasn't totally clear. I got what you meant, but it could have been worded much better IMO. Commented Sep 18, 2012 at 4:32
  • then can you just give a comment instead of downvoting like that? is it a little impolite? Commented Sep 18, 2012 at 4:43
  • 1
    This question is quite clear. People claiming otherwise are simply unfamiliar with the subject matter. Commented Jul 24, 2014 at 18:19
  • 1
    Questions seeking off site resources, such as tools and libraries are off-topic for Stackoverflow. Commented Feb 13, 2015 at 13:15

2 Answers 2

2

There's no find command in android.

You can try with busybox.

Sign up to request clarification or add additional context in comments.

Comments

-1

I'm going to assume that you understand how to use the Linux find command and you just need help with running a linux command within Android.

Something like Read command output inside su process might help you.

Also, You can use http://code.google.com/p/roottools/ to run command line processes. It simplifies it quite a bit, and you don't actually have to run the processes as root last time I checked.

If I'm totally off on what you wanted, please clarify what you need and I'll do my best to help.

5 Comments

Thanks for your point, but I actually don't need to run it. I want to the implementation of find command.
Still not 100% sure I understand your question. The implementation of the find command would be exactly the same as on any linux machine I believe. The difference between other linux machines would be in how it handles command-line input and output in general (i believe). For this, you could just download the entire Android OS source code and see how it is implemented, perhaps. You could also try asking your question on XDA.
As I said, I couldn't find it when I looked into the Android OS source code on github. I would be very pleased if some one can point me to where it is
your answer is totally unrelated to the question
I would totally down vote this answer if SO would let me.