On Termux, /data is a real mount, so df from coreutils works. For machine-readable output in bytes:
/data
df
df -B1 --output=avail /data | tail -n 1
This prints just the available space in bytes (e.g. 48373227520), with no header or units.
48373227520
Alternatives:
# Available KiB, single number df -k /data | tail -n 1 | awk '{print $4}' # stat-based: free blocks × block size, computed to bytes stat -f -c '%a * %S' /data | bc
Notes:
--output=avail
tail -n 1
avail
free
--output=itotal
df -B1 --output=size,used,avail /data | tail -n 1
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.
Vibe can make mistakes. Check answers. Learn more
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.
Vibe can make mistakes. Check answers. Learn more