Using DU on Android
Asked Answered
G

2

5

Is there something similar to the unix command du i can use on adb shell? I'm trying to find a way to see how big each file is because I have an application that is growing very large and out of control and I am trying to determine which file/database it is specifically so I can address the problem.

I am testing this on an Evo 4G and getting:

du: permission denied

or after I root/remount it:

du: not found

cd into other folders dose not help me at any point.

Ginseng answered 23/2, 2012 at 20:46 Comment(2)
Not sure whether it comes from my cygwin install, but I have du under the dos command prompt, and it is also accessible to "adb shell". As my device is not rooted, it is only useful to explore data directories.Andes
Most recent Android phones should have the du command in the adb shell or /system/bin.Fleshly
G
5

Install Terminal IDE (or some other app that includes du or BusyBox - TIDE includes quite a lot in addition to that, which you may not want), and either ask the question with one of its terminals, or by connecting to its telnet server and then asking.

Gallard answered 23/2, 2012 at 21:10 Comment(0)
B
3

ls -l should work in th adb shell and that lists all the files in a current directory with their sizes.

HTH

Beadroll answered 23/2, 2012 at 20:52 Comment(3)
I was looking for something recursive listening (for folders and subfolders) and will total the memory usage up also :(Ginseng
Yeah, you won't get size totaling unfortunately, but you can add -R to ls to make it recursive through all directories starting with current. If you are looking for the size of a specific file anyway, you shouldn't have to do much math. Cheers.Beadroll
that is strange, I also need to get the sizes, but ls -l is not showing them. It shows the permissions, the dates and 2 columns like app_(and a number) or app_system.Pittel

© 2022 - 2024 — McMap. All rights reserved.