Bash Commands – Finding files

Syntax:

find locationtosearch -iname pattern[/code]

Eg:

find /data/data -iname *db*[/code]

Will recursively find the list of .db files in /data/data, useful for locating sqlite databases on Android

 

To locate the Contacts database of Android, and then Edit it with sqlite3 (Note that sqlite3 does not come with most roms. Cyanogenmod has it. You can of course cross compile it)

find /data/data/com.android.providers.contacts -iname *db*[/code]

To edit the Contacts database:

sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>.tables[/code]