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.

Falcon165o
  • 2,875
  • 1
  • 20
  • 31
  • 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. – Papa Smurf Dec 26 '20 at 22:13

2 Answers2

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.

Julian Fondren
  • 5,459
  • 17
  • 29
3

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

HTH

devunwired
  • 62,780
  • 12
  • 127
  • 139
  • 3
    I was looking for something recursive listening (for folders and subfolders) and will total the memory usage up also :( – Falcon165o Feb 23 '12 at 20:54
  • 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. – devunwired Feb 23 '12 at 21:10
  • 1
    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. – Santiago May 24 '13 at 01:06