When using
df -h | grep /dev/root | awk '{print $5}'
I get the usage of my SD Card in my Pi: 78%
But when I use
/usr/bin/ssh -i /path/to/key user@server "df -h | grep /dev/root | awk '{print $5}'"
from another computer, I get:
/dev/root 7.2G 5.3G 1.6G 78% /
Full df -h
:
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.2G 5.3G 1.6G 78% /
devtmpfs 364M 0 364M 0% /dev
tmpfs 368M 68K 368M 1% /dev/shm
tmpfs 368M 5.2M 363M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 368M 0 368M 0% /sys/fs/cgroup
/dev/mmcblk0p1 60M 21M 40M 35% /boot
tmpfs 74M 4.0K 74M 1% /run/user/1000
$
with a backslash:"df -h | grep /dev/root | awk '{print \$5}'"
df /dev/root --output=pcent | tail -1
df: ‘/dev/root’: No such file or directory
. The Pi handles the storage different than other Linux.