What's the partition mount point for a FULL-HD install?

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

What's the partition mount point for a FULL-HD install?

#1 Post by sunburnt »

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.

DennisF
Posts: 86
Joined: Thu 01 Mar 2007, 02:38

#2 Post by DennisF »

The mount point here is "/"
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
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:

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
# 
I guess you could test to see if more than 1 line was returned.
Kind of kludgey though.

-D

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#3 Post by sunburnt »

DennisF; Yep your right, I came up with this fix:

Code: Select all

FREE=`df |grep '/$' |awk '{print $4}'`
I should have the updated sfsInstaller done in a little.

Post Reply