How to get available/free sdcard space in android with adb command

▼魔方 西西 提交于 2020-01-01 01:57:25

问题


I am trying to get free sdcard space with adb command, but I could not able to achieve. Any suggestions how to get the sdcard space.


回答1:


Use df, as with any Linux distro. Not all Android devices may have it, but it usually seems to be available.




回答2:


  1. df: Disk space details.

    adb shell df

  2. du: Disk space used by the specified files and subdirectories.

    adb shell du

  3. df -h: Disk space details in KB/MB format.

    adb shell df -h

  4. du -h: Disk space used by the specified files and subdirectories in KB/MB format.

    adb shell du -h

  5. For specific folder desk space details.

    adb shell df /system

  6. For specific folder and sub-directories desk space details

    adb shell du /system




回答3:


df -h to find disk usage and to find big files:

du -a <the_dir> | sort -n -r | head -n 20


来源:https://stackoverflow.com/questions/22947690/how-to-get-available-free-sdcard-space-in-android-with-adb-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!