Dan McGhee wrote:

The purpose of "df" is to show the available space in *mounted*
filesystems.  The command <df -h>, here df has no argument, show the
space available on all mounted *filesystems.*  Its output is filesystems
and not devices.

I think what you're looking for is a utility to list the partition table
of your machine.  <parted -l> will give you that list. I suggest parted
and not fdisk because I don't think fdisk recognizes gpt partitions
yet.  If you know that your partition table is *not* gpt, fdisk will
work fine.

Using df to help write /etc/fstab is a good idea.  But if you want all
of your partitions in it, df won't give you the complete picture.

Just a comment. I've started to use the findmnt commend in later util-linux versions. It's more robust than df.

I have an alias:

alias dfh='findmnt -ln -o SOURCE,TARGET,FSTYPE,SIZE,USED,AVAIL,USE% | grep sd'

Looking at it just now, perhaps I should add '|sort -h' to that.

$ dfh | sort -h
/dev/sda1      /boot       ext3     94.7M 55.3M  34.3M  58%
/dev/sda11     /home       ext3      9.7G    9G 230.5M  93%
/dev/sda5      /           ext4      9.7G  6.5G   2.8G  66%
/dev/sda9      /usr/src    ext3     39.3G 23.8G  13.5G  61%
/dev/sdb3      /mnt/lfs    ext4      9.7G  2.8G   6.4G  29%
/dev/sdb4      /opt        ext4      9.7G  8.6G 590.8M  89%
/dev/sdb5      /tmp        ext4      9.7G  7.5G   1.7G  78%

Hmm. Now that I look at it, I need to clean up /opt. 3 OpenJDK versions, 3 ant, 2 fop, 3 ftetts, 4 kde, 6 qt, 2 texlive, and 2 xorg.

:)

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to