Skip to main content
resolve symlinks on cmd line
Source Link
alecxs
  • 4.3k
  • 3
  • 17
  • 34
~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.3g2$|\.3gp$|\.3gpp$|\.3gpp2$|\.asf$|\.asx$|\.avi$|\.dif$|\.dl$|\.dv$|\.fli$|\.lsf$|\.lsx$|\.m4v$|\.mkv$|\.mng$|\.mov$|\.movie$|\.mp4$|\.mpe$|\.mpeg$|\.mpg$|\.mxu$|\.qt$|\.ts$|\.vob$|\.webm$|\.wm$|\.wmv$|\.wmx$|\.wrf$|\.wvx$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
75696063        /sdcard/DCIM/Camera/VID_20190726_190531.mp4
97849262        /sdcard/DCIM/Camera/VID_20190721_142818.mp4
331238039       /sdcard/TIMELAPSE OF THE FUTURE_ A Journey to the End of Time (4K).mp4
1554180683
~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.art$|\.arw$|\.bmp$|\.cr2$|\.dng$|\.gif$|\.jng$|\.jpe$|\.jpeg$|\.jpg$|\.nef$|\.nrw$|\.orf$|\.pbm$|\.pcx$|\.pef$|\.pgm$|\.png$|\.pnm$|\.ppm$|\.psd$|\.ras$|\.rgb$|\.rw2$|\.srw$|\.svg$|\.svgz$|\.tif$|\.tiff$|\.wbmp$|\.webp$|\.xbm$|\.xpm$|\.xwd$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
31944   /sdcard/.recycle/1565980569828.3/2080952923/Screenshot_20190816-155104_Firefox.png
34099   /sdcard/OLD_sdcard/Download/iptables_overview.jpg
6839118 /sdcard/DCIM/Camera/PANO_20190421_132245.jpg
7726000 /sdcard/DCIM/Camera/IMG_20181123_144811.jpg
669063808
~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.aac$|\.aif$|\.aifc$|\.aiff$|\.amr$|\.awb$|\.flac$|\.gsm$|\.m3u$|\.m4a$|\.mka$|\.mp2$|\.mp3$|\.mpega$|\.mpga$|\.oga$|\.ogg$|\.pls$|\.ra$|\.ram$|\.rm$|\.sd2$|\.snd$|\.wav$|\.wax$|\.wma$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
196556  /sdcard/OLD_sdcard/Alarms/Freedom.ogg
451614  /sdcard/OLD_sdcard/CallRecordings/0507189091_190225_191938461.amr
5652322 /sdcard/.recycle/1564398739475.3/710629278/L'Orfeo(preview).mp3
186868393
~$ find /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.3g2$|\.3gp$|\.3gpp$|\.3gpp2$|\.asf$|\.asx$|\.avi$|\.dif$|\.dl$|\.dv$|\.fli$|\.lsf$|\.lsx$|\.m4v$|\.mkv$|\.mng$|\.mov$|\.movie$|\.mp4$|\.mpe$|\.mpeg$|\.mpg$|\.mxu$|\.qt$|\.ts$|\.vob$|\.webm$|\.wm$|\.wmv$|\.wmx$|\.wrf$|\.wvx$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
75696063        /sdcard/DCIM/Camera/VID_20190726_190531.mp4
97849262        /sdcard/DCIM/Camera/VID_20190721_142818.mp4
331238039       /sdcard/TIMELAPSE OF THE FUTURE_ A Journey to the End of Time (4K).mp4
1554180683
~$ find /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.art$|\.arw$|\.bmp$|\.cr2$|\.dng$|\.gif$|\.jng$|\.jpe$|\.jpeg$|\.jpg$|\.nef$|\.nrw$|\.orf$|\.pbm$|\.pcx$|\.pef$|\.pgm$|\.png$|\.pnm$|\.ppm$|\.psd$|\.ras$|\.rgb$|\.rw2$|\.srw$|\.svg$|\.svgz$|\.tif$|\.tiff$|\.wbmp$|\.webp$|\.xbm$|\.xpm$|\.xwd$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
31944   /sdcard/.recycle/1565980569828.3/2080952923/Screenshot_20190816-155104_Firefox.png
34099   /sdcard/OLD_sdcard/Download/iptables_overview.jpg
6839118 /sdcard/DCIM/Camera/PANO_20190421_132245.jpg
7726000 /sdcard/DCIM/Camera/IMG_20181123_144811.jpg
669063808
~$ find /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.aac$|\.aif$|\.aifc$|\.aiff$|\.amr$|\.awb$|\.flac$|\.gsm$|\.m3u$|\.m4a$|\.mka$|\.mp2$|\.mp3$|\.mpega$|\.mpga$|\.oga$|\.ogg$|\.pls$|\.ra$|\.ram$|\.rm$|\.sd2$|\.snd$|\.wav$|\.wax$|\.wma$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
196556  /sdcard/OLD_sdcard/Alarms/Freedom.ogg
451614  /sdcard/OLD_sdcard/CallRecordings/0507189091_190225_191938461.amr
5652322 /sdcard/.recycle/1564398739475.3/710629278/L'Orfeo(preview).mp3
186868393
~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.3g2$|\.3gp$|\.3gpp$|\.3gpp2$|\.asf$|\.asx$|\.avi$|\.dif$|\.dl$|\.dv$|\.fli$|\.lsf$|\.lsx$|\.m4v$|\.mkv$|\.mng$|\.mov$|\.movie$|\.mp4$|\.mpe$|\.mpeg$|\.mpg$|\.mxu$|\.qt$|\.ts$|\.vob$|\.webm$|\.wm$|\.wmv$|\.wmx$|\.wrf$|\.wvx$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
75696063        /sdcard/DCIM/Camera/VID_20190726_190531.mp4
97849262        /sdcard/DCIM/Camera/VID_20190721_142818.mp4
331238039       /sdcard/TIMELAPSE OF THE FUTURE_ A Journey to the End of Time (4K).mp4
1554180683
~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.art$|\.arw$|\.bmp$|\.cr2$|\.dng$|\.gif$|\.jng$|\.jpe$|\.jpeg$|\.jpg$|\.nef$|\.nrw$|\.orf$|\.pbm$|\.pcx$|\.pef$|\.pgm$|\.png$|\.pnm$|\.ppm$|\.psd$|\.ras$|\.rgb$|\.rw2$|\.srw$|\.svg$|\.svgz$|\.tif$|\.tiff$|\.wbmp$|\.webp$|\.xbm$|\.xpm$|\.xwd$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
31944   /sdcard/.recycle/1565980569828.3/2080952923/Screenshot_20190816-155104_Firefox.png
34099   /sdcard/OLD_sdcard/Download/iptables_overview.jpg
6839118 /sdcard/DCIM/Camera/PANO_20190421_132245.jpg
7726000 /sdcard/DCIM/Camera/IMG_20181123_144811.jpg
669063808
~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.aac$|\.aif$|\.aifc$|\.aiff$|\.amr$|\.awb$|\.flac$|\.gsm$|\.m3u$|\.m4a$|\.mka$|\.mp2$|\.mp3$|\.mpega$|\.mpga$|\.oga$|\.ogg$|\.pls$|\.ra$|\.ram$|\.rm$|\.sd2$|\.snd$|\.wav$|\.wax$|\.wma$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}'
...
196556  /sdcard/OLD_sdcard/Alarms/Freedom.ogg
451614  /sdcard/OLD_sdcard/CallRecordings/0507189091_190225_191938461.amr
5652322 /sdcard/.recycle/1564398739475.3/710629278/L'Orfeo(preview).mp3
186868393
added 89 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225

Non-root part is over here. Next to explore the /data you need root accesspartition you need root access. First to make it clear, throughout the whole life of a device, a common user interacts only with one partition labeled userdata. But it's not very uncommon to have 50+ partitions on Android devices. Details (details can be seen in this thread). So here we are talking about the space usage on userdata partition which is mounted at /data. One of its sub-directory /data/media/0 is the one we see in file explorers or at /sdcard or at /storage/emulated/0. See What is /storage/emulated/0? for details.

Note: Don't confuse the units. 61071360 sectors equal 31268536320 bytes, which equal 31.27 Gigabytes (GB) or 29.12 Gibibyte (GiB).

Total available size of eMMC is 31.27 GB (ignoring e.g. RPMB and provisioned space etc.) and size of /data filesystem is 25.76 GB (See! I thought it would be 32.00 GiB). It means that 5.5 GB space was occupied when the device was shipped from the factory. It's mainly taken by the system, vendor and cache partitions, and a small part by other partitions. Partition table takes a few KBs but there are possibly a few MBs left free in between partitions, some space is wasted due to encryption, and so on. Following screenshot shows the complete partition table:


(Click image for enlarged view)

(Click image for enlarged view)

Now coming to the used space:

So total used space on device is 15.9 GB (5.5 and 10.4) out of 31.27 GB. Note the difference with the values in screenshot. The difference in total size could be because of rounding-off the sum of /data and /system to the nearest power of 2.

5.3 GB out of 9.25 GB is used by the public files in /sdcard as explained abovein the start. Rest of the 3.95 GB space is mainly taken by three categories of files. Keeping things simple, following are the major directories which sum up to total app size (1, 2, 3, 4):

It's 3.7 GB, leaving only 250 MB behind, some of which is taken by the /sdcard of other two user profiles (/data/media/<user_id>). The rest is used by system logs and configuration files, particularly in /data/system* and /data/misc* directories.

Non-root part is over here. Next to explore /data you need root access. First to make clear, throughout the whole life of device, a common user interacts only with one partition labeled userdata. But it's not very uncommon to have 50+ partitions on Android devices. Details can be seen in this thread. So we are talking about the space usage on userdata partition which is mounted at /data. One of its sub-directory /data/media/0 is the one we see in file explorers or at /sdcard or at /storage/emulated/0. See What is /storage/emulated/0? for details.

Note: Don't confuse units. 61071360 sectors equal 31268536320 bytes, which equal 31.27 Gigabytes (GB) or 29.12 Gibibyte (GiB).

Total available size of eMMC is 31.27 GB (ignoring e.g. RPMB and provisioned space etc.) and size of /data filesystem is 25.76 GB (See! I thought it would be 32.00 GiB). It means 5.5 GB space was occupied when device was shipped from factory. It's mainly taken by system, vendor and cache, and a small part by other partitions. Partition table takes a few KBs but there are possibly a few MBs left free in between partitions, some space is wasted due to encryption, and so on. Following screenshot shows the complete partition table:


(Click image for enlarged view)

Now coming to used space:

So total used space on device is 15.9 GB (5.5 and 10.4) out of 31.27 GB. Note the difference with values in screenshot. The difference in total size could be because of rounding-off the sum of /data and /system to nearest power of 2.

5.3 GB out of 9.25 GB is used by public files in /sdcard as explained above. Rest of the 3.95 GB space is mainly taken by three categories of files. Keeping things simple, following are the major directories which sum up to total app size (1, 2, 3, 4):

It's 3.7 GB, leaving only 250 MB behind, some of which is taken by /sdcard of other two user profiles (/data/media/<user_id>). The rest is used by system logs and configuration files, particularly in /data/system* and /data/misc*.

Non-root part is over here. Next to explore the /data partition you need root access. First to make it clear, throughout the whole life of a device, a common user interacts only with one partition labeled userdata. But it's not very uncommon to have 50+ partitions on Android devices (details can be seen in this thread). So here we are talking about the space usage on userdata partition which is mounted at /data. One of its sub-directory /data/media/0 is the one we see in file explorers or at /sdcard or at /storage/emulated/0. See What is /storage/emulated/0? for details.

Note: Don't confuse the units. 61071360 sectors equal 31268536320 bytes, which equal 31.27 Gigabytes (GB) or 29.12 Gibibyte (GiB).

Total available size of eMMC is 31.27 GB (ignoring e.g. RPMB and provisioned space etc.) and size of /data filesystem is 25.76 GB (See! I thought it would be 32.00 GiB). It means that 5.5 GB space was occupied when the device was shipped from the factory. It's mainly taken by the system, vendor and cache partitions, and a small part by other partitions. Partition table takes a few KBs but there are possibly a few MBs left free in between partitions, some space is wasted due to encryption, and so on. Following screenshot shows the complete partition table:


(Click image for enlarged view)

Now coming to the used space:

So total used space on device is 15.9 GB (5.5 and 10.4) out of 31.27 GB. Note the difference with the values in screenshot. The difference in total size could be because of rounding-off the sum of /data and /system to the nearest power of 2.

5.3 GB out of 9.25 GB is used by the public files in /sdcard as explained in the start. Rest of the 3.95 GB space is mainly taken by three categories of files. Keeping things simple, following are the major directories which sum up to total app size (1, 2, 3, 4):

It's 3.7 GB, leaving only 250 MB behind, some of which is taken by the /sdcard of other two user profiles (/data/media/<user_id>). The rest is used by system logs and configuration files, particularly in /data/system* and /data/misc* directories.

added 3 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225

It's 3.7 GB, leaving only 250 MB behind, some of which is taken by /sdcard of other two user profiles (/data/media/<user_id>). The rest is used by system logs and configuration files, particularly in /data/system* and /data/misc*. 

This system usage is shown as "System" which excludes shared storage size (5, 6). Some figures differ from Android but after all we know how the space is actually used, and where it's being wasted.

It's 3.7 GB, leaving only 250 MB behind, some of which is taken by /sdcard of other two user profiles (/data/media/<user_id>). The rest is used by system logs and configuration files, particularly in /data/system* and /data/misc*. This system usage is shown as "System" which excludes shared storage size (5, 6). Some figures differ from Android but after all we know how the space is actually used, and where it's being wasted.

It's 3.7 GB, leaving only 250 MB behind, some of which is taken by /sdcard of other two user profiles (/data/media/<user_id>). The rest is used by system logs and configuration files, particularly in /data/system* and /data/misc*. 

This system usage is shown as "System" which excludes shared storage size (5, 6). Some figures differ from Android but after all we know how the space is actually used, and where it's being wasted.

clickable link corrected
Source Link
Robert
  • 21.7k
  • 6
  • 50
  • 70
Loading
deleted 101 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading
deleted 158 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading
added 184 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading
added 446 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading
added 331 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading
added 1004 characters in body; added 30 characters in body
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading
Source Link
Irfan Latif
  • 21.2k
  • 3
  • 74
  • 225
Loading