df -P gives me a combination of Mega and Giga byte

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












$ df -P
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Rootvg-rootlv 20G 613M 19G 4% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 240M 113M 115M 50% /boot
/dev/mapper/Rootvg-homelv 20G 2.0G 17G 11% /home
/dev/mapper/Rootvg-instlv 2.0G 2.9M 1.9G 1% /install
/dev/mapper/Rootvg-optlv 976M 53M 872M 6% /opt
/dev/mapper/Rootvg-itmlv 4.8G 10M 4.6G 1% /opt/IBM/ITM
/dev/mapper/Rootvg-tmplv 20G 2.8M 19G 1% /tmp
/dev/mapper/Rootvg-usrlv 32G 2.2G 28G 8% /usr
/dev/mapper/Rootvg-varlv 20G 198M 19G 2% /var
/dev/mapper/Rootvg-loglv 29G 73M 28G 1% /var/log
/dev/mapper/Rootvg-auditlv 27G 18M 26G 1% /var/log/audit
/dev/mapper/Appvg-applv 123G 868M 116G 1% /app


I am trying to a add the total Size (add up all shown in 2nd column)
How do I go by doing that ? as there are a combination of mega and giga







share|improve this question

















  • 1




    I am unable to replicate this with df -P. Are you sure you're not using df -Ph?
    – DopeGhoti
    May 8 at 19:16










  • Check whether df is aliased to df -h. Use command df -P or df -P if it is.
    – Kusalananda
    May 8 at 19:28










  • df -P or df -Ph give me the same results
    – tester787
    May 8 at 19:28










  • alias| grep df alias df='df -h'
    – tester787
    May 8 at 19:30














up vote
0
down vote

favorite












$ df -P
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Rootvg-rootlv 20G 613M 19G 4% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 240M 113M 115M 50% /boot
/dev/mapper/Rootvg-homelv 20G 2.0G 17G 11% /home
/dev/mapper/Rootvg-instlv 2.0G 2.9M 1.9G 1% /install
/dev/mapper/Rootvg-optlv 976M 53M 872M 6% /opt
/dev/mapper/Rootvg-itmlv 4.8G 10M 4.6G 1% /opt/IBM/ITM
/dev/mapper/Rootvg-tmplv 20G 2.8M 19G 1% /tmp
/dev/mapper/Rootvg-usrlv 32G 2.2G 28G 8% /usr
/dev/mapper/Rootvg-varlv 20G 198M 19G 2% /var
/dev/mapper/Rootvg-loglv 29G 73M 28G 1% /var/log
/dev/mapper/Rootvg-auditlv 27G 18M 26G 1% /var/log/audit
/dev/mapper/Appvg-applv 123G 868M 116G 1% /app


I am trying to a add the total Size (add up all shown in 2nd column)
How do I go by doing that ? as there are a combination of mega and giga







share|improve this question

















  • 1




    I am unable to replicate this with df -P. Are you sure you're not using df -Ph?
    – DopeGhoti
    May 8 at 19:16










  • Check whether df is aliased to df -h. Use command df -P or df -P if it is.
    – Kusalananda
    May 8 at 19:28










  • df -P or df -Ph give me the same results
    – tester787
    May 8 at 19:28










  • alias| grep df alias df='df -h'
    – tester787
    May 8 at 19:30












up vote
0
down vote

favorite









up vote
0
down vote

favorite











$ df -P
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Rootvg-rootlv 20G 613M 19G 4% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 240M 113M 115M 50% /boot
/dev/mapper/Rootvg-homelv 20G 2.0G 17G 11% /home
/dev/mapper/Rootvg-instlv 2.0G 2.9M 1.9G 1% /install
/dev/mapper/Rootvg-optlv 976M 53M 872M 6% /opt
/dev/mapper/Rootvg-itmlv 4.8G 10M 4.6G 1% /opt/IBM/ITM
/dev/mapper/Rootvg-tmplv 20G 2.8M 19G 1% /tmp
/dev/mapper/Rootvg-usrlv 32G 2.2G 28G 8% /usr
/dev/mapper/Rootvg-varlv 20G 198M 19G 2% /var
/dev/mapper/Rootvg-loglv 29G 73M 28G 1% /var/log
/dev/mapper/Rootvg-auditlv 27G 18M 26G 1% /var/log/audit
/dev/mapper/Appvg-applv 123G 868M 116G 1% /app


I am trying to a add the total Size (add up all shown in 2nd column)
How do I go by doing that ? as there are a combination of mega and giga







share|improve this question













$ df -P
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/Rootvg-rootlv 20G 613M 19G 4% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/sda1 240M 113M 115M 50% /boot
/dev/mapper/Rootvg-homelv 20G 2.0G 17G 11% /home
/dev/mapper/Rootvg-instlv 2.0G 2.9M 1.9G 1% /install
/dev/mapper/Rootvg-optlv 976M 53M 872M 6% /opt
/dev/mapper/Rootvg-itmlv 4.8G 10M 4.6G 1% /opt/IBM/ITM
/dev/mapper/Rootvg-tmplv 20G 2.8M 19G 1% /tmp
/dev/mapper/Rootvg-usrlv 32G 2.2G 28G 8% /usr
/dev/mapper/Rootvg-varlv 20G 198M 19G 2% /var
/dev/mapper/Rootvg-loglv 29G 73M 28G 1% /var/log
/dev/mapper/Rootvg-auditlv 27G 18M 26G 1% /var/log/audit
/dev/mapper/Appvg-applv 123G 868M 116G 1% /app


I am trying to a add the total Size (add up all shown in 2nd column)
How do I go by doing that ? as there are a combination of mega and giga









share|improve this question












share|improve this question




share|improve this question








edited May 8 at 19:52









Jeff Schaller

31.1k846105




31.1k846105









asked May 8 at 19:14









tester787

9028




9028







  • 1




    I am unable to replicate this with df -P. Are you sure you're not using df -Ph?
    – DopeGhoti
    May 8 at 19:16










  • Check whether df is aliased to df -h. Use command df -P or df -P if it is.
    – Kusalananda
    May 8 at 19:28










  • df -P or df -Ph give me the same results
    – tester787
    May 8 at 19:28










  • alias| grep df alias df='df -h'
    – tester787
    May 8 at 19:30












  • 1




    I am unable to replicate this with df -P. Are you sure you're not using df -Ph?
    – DopeGhoti
    May 8 at 19:16










  • Check whether df is aliased to df -h. Use command df -P or df -P if it is.
    – Kusalananda
    May 8 at 19:28










  • df -P or df -Ph give me the same results
    – tester787
    May 8 at 19:28










  • alias| grep df alias df='df -h'
    – tester787
    May 8 at 19:30







1




1




I am unable to replicate this with df -P. Are you sure you're not using df -Ph?
– DopeGhoti
May 8 at 19:16




I am unable to replicate this with df -P. Are you sure you're not using df -Ph?
– DopeGhoti
May 8 at 19:16












Check whether df is aliased to df -h. Use command df -P or df -P if it is.
– Kusalananda
May 8 at 19:28




Check whether df is aliased to df -h. Use command df -P or df -P if it is.
– Kusalananda
May 8 at 19:28












df -P or df -Ph give me the same results
– tester787
May 8 at 19:28




df -P or df -Ph give me the same results
– tester787
May 8 at 19:28












alias| grep df alias df='df -h'
– tester787
May 8 at 19:30




alias| grep df alias df='df -h'
– tester787
May 8 at 19:30










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Use the -B option to specify the specific "blocksize" you want all values reported in. The blocksize is expressed with an integer and units. From the man page I have:




The SIZE argument is an integer and optional unit (example: 10K is
10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,...
(powers of 1000).




For example, df -BM will print all the sizes in megabytes. (It will override a previous -h in case that is set in an alias; e.g., df -h -BM is that same)






share|improve this answer





















  • how would I total that ?
    – tester787
    May 8 at 19:58










  • Use --total to ask df to add them up.
    – Alex Tullenhoff
    May 8 at 20:03










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442618%2fdf-p-gives-me-a-combination-of-mega-and-giga-byte%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










Use the -B option to specify the specific "blocksize" you want all values reported in. The blocksize is expressed with an integer and units. From the man page I have:




The SIZE argument is an integer and optional unit (example: 10K is
10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,...
(powers of 1000).




For example, df -BM will print all the sizes in megabytes. (It will override a previous -h in case that is set in an alias; e.g., df -h -BM is that same)






share|improve this answer





















  • how would I total that ?
    – tester787
    May 8 at 19:58










  • Use --total to ask df to add them up.
    – Alex Tullenhoff
    May 8 at 20:03














up vote
3
down vote



accepted










Use the -B option to specify the specific "blocksize" you want all values reported in. The blocksize is expressed with an integer and units. From the man page I have:




The SIZE argument is an integer and optional unit (example: 10K is
10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,...
(powers of 1000).




For example, df -BM will print all the sizes in megabytes. (It will override a previous -h in case that is set in an alias; e.g., df -h -BM is that same)






share|improve this answer





















  • how would I total that ?
    – tester787
    May 8 at 19:58










  • Use --total to ask df to add them up.
    – Alex Tullenhoff
    May 8 at 20:03












up vote
3
down vote



accepted







up vote
3
down vote



accepted






Use the -B option to specify the specific "blocksize" you want all values reported in. The blocksize is expressed with an integer and units. From the man page I have:




The SIZE argument is an integer and optional unit (example: 10K is
10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,...
(powers of 1000).




For example, df -BM will print all the sizes in megabytes. (It will override a previous -h in case that is set in an alias; e.g., df -h -BM is that same)






share|improve this answer













Use the -B option to specify the specific "blocksize" you want all values reported in. The blocksize is expressed with an integer and units. From the man page I have:




The SIZE argument is an integer and optional unit (example: 10K is
10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,...
(powers of 1000).




For example, df -BM will print all the sizes in megabytes. (It will override a previous -h in case that is set in an alias; e.g., df -h -BM is that same)







share|improve this answer













share|improve this answer



share|improve this answer











answered May 8 at 19:51









Alex Tullenhoff

783




783











  • how would I total that ?
    – tester787
    May 8 at 19:58










  • Use --total to ask df to add them up.
    – Alex Tullenhoff
    May 8 at 20:03
















  • how would I total that ?
    – tester787
    May 8 at 19:58










  • Use --total to ask df to add them up.
    – Alex Tullenhoff
    May 8 at 20:03















how would I total that ?
– tester787
May 8 at 19:58




how would I total that ?
– tester787
May 8 at 19:58












Use --total to ask df to add them up.
– Alex Tullenhoff
May 8 at 20:03




Use --total to ask df to add them up.
– Alex Tullenhoff
May 8 at 20:03












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442618%2fdf-p-gives-me-a-combination-of-mega-and-giga-byte%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay