I need to know what's the mount point for the partition of a Full-HD install.
The command below will get the free space of the full-HD install's partition:
FREE=`df |grep '( partition mount point )' |awk '{print $4}'`
I looked but couldn't really satisfy myself as to just what the mount point is.
What's the partition mount point for a FULL-HD install?
The mount point here is "/"
Seems correct for this install:
But someone could decide to mount a different partition under /usr or /root or any directory for that matter. So if the SFS file is copying to any directory with a mounted partition you would want to check for space on the device.
Or maybe you just warn "Hey you got more than one device mounted on this install, make sure you got nMB's free to do this copy."
If I mount up another device your command would fail:
I guess you could test to see if more than 1 line was returned.
Kind of kludgey though.
-D
Seems correct for this install:
Code: Select all
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdc5 2015984 1079628 833948 56% /
# df |grep /
/dev/hdc5 2015984 1079628 833948 56% /
# df |grep / | awk '{print$4}'
833948
Or maybe you just warn "Hey you got more than one device mounted on this install, make sure you got nMB's free to do this copy."
If I mount up another device your command would fail:
Code: Select all
# df |grep / | awk '{print$4}'
833896
1176416
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdc5 2015984 1079680 833896 56% /
/dev/hdc9 8233248 7056832 1176416 86% /mnt/hdc9
#
Kind of kludgey though.
-D
DennisF; Yep your right, I came up with this fix:
I should have the updated sfsInstaller done in a little.
Code: Select all
FREE=`df |grep '/$' |awk '{print $4}'`