What is the unix command to see how much disk space there is and how much is remaining?

后端 未结 10 505
别那么骄傲
别那么骄傲 2021-02-05 05:53

I\'m looking for the equivalent of right clicking on the drive in windows and seeing the disk space used and remaining info.

10条回答
  •  既然无缘
    2021-02-05 06:28

    Note: The original question was answered already, but I would just like to expand on it with some extras that are relevant to the topic.

    Your AIX installation would first be put into volume groups. This is done upon installation.

    It will first create rootvg (as in root volume group). This is kinda like your actual hard drive mapped.

    This would be equivalent to Disc Management in Windows. AIX wont use up all of that space for its file systems like we tend to do it in consumer Windows machines. Instead there will be a good bit of unallocated space.

    To check how much space your rootvg would have you use the following command.

    lsvg rootvg
    

    That would stand for list volume group rootvg. This will give you information like the size of physical partitions (PP), Total PPs assigned to the volume group, Free PPs in the volume group, etc. Regardless, the output should be fairly comprehensive.

    Next thing you may be interested in, is the file systems on the volume group. Each file system would have certain amount of space given within the volume group it belongs to.

    To check what file systems you got on your volume group you use the following command.

    lsvgfs rootvg
    

    As in list volume group file systems for rootvg.

    You can check how much space each file system has using the following command.

    df
    

    I personally like to refine it with flags like -m and -g (in megabytes and gigabytes respectively)

    If you have free space available in your volume group, you can assign it to your file systems using the following command.

    chfs -a size=+1G /home
    

    As in change file system attribute size by adding 1 G where file system is /home. use man chfs for more instructions. This is a powerful tool. This example is for adjusting size, however you can do more with this command than that.

    Sources: http://www.ibm.com/developerworks/aix/library/au-rootvg/ + My own experience working with AIX.

提交回复
热议问题