LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2016, 02:14 PM   #1
pradeepspa
Member
 
Registered: Oct 2015
Posts: 79

Rep: Reputation: Disabled
Command to fins system size


Hi All,

First of all mind me asking so basic question. if someone ask to find the size of the linux system what command will be useful?

Its a VM where I could find its size through vspehere. i am just checking those size correlates with command line.

In Vsphere it shows,
Provisioned Storage : 244 GB
used Storage : 166.57 GB

In Cmd Line:
I used "parted -l", adding upthe memory it shows in each disk it comes around 244gb.

Where i could I see used size?
 
Old 01-04-2016, 02:19 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
"df -h" will show the total, used, and available space for all mounted partitions.
 
Old 01-04-2016, 02:38 PM   #3
pradeepspa
Member
 
Registered: Oct 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
In "df -h", When i add used size it shows 135 gb where vshpere shows the used space as 166gb
 
Old 01-04-2016, 03:38 PM   #4
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
I would bet the difference in sizes there is due to some buffering by vsphere for the file system in use.
 
Old 01-04-2016, 03:52 PM   #5
Hasek39
Member
 
Registered: Jul 2015
Location: Pittsburgh, PA, US
Distribution: Slackware
Posts: 120

Rep: Reputation: Disabled
If you want to know the volume of free and used space in the whole system than
Code:
df -h
and if you are interested in any directory
Code:
du -h /path/to/directory/
 
Old 01-04-2016, 04:03 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by pradeepspa View Post
In "df -h", When i add used size it shows 135 gb where vshpere shows the used space as 166gb
Quite possibly you are forgetting round off in the numbers presented, or possibly the difference between a 1024 and 1000 base unit size...
 
Old 01-05-2016, 06:29 AM   #7
pradeepspa
Member
 
Registered: Oct 2015
Posts: 79

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Quite possibly you are forgetting round off in the numbers presented, or possibly the difference between a 1024 and 1000 base unit size...
Thanks for the response. If it would be round off why its like 30 gb of difference
 
Old 01-05-2016, 06:53 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by pradeepspa View Post
Thanks for the response. If it would be round off why its like 30 gb of difference
1GB < 1Gib; 1GB 1,000,000,000 bytes, 1GiB = 1,073,741,824, for a difference of 73,741,824 bytes. It adds up.

roundoff tends to drop things below a tenth of a GB, and that can also add to the error (and I'm not sure of the rounding method used here - it could be truncation, or conversion to a string... then trimmed), and there is the possible rounding from integers to float... which isn't accurate for really large numbers.

Last edited by jpollard; 01-05-2016 at 06:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the size of the original size of Linux operating system? kojin88 Linux - Distributions 6 11-03-2015 08:47 PM
What is the size of command line sluge Linux - Software 3 12-05-2012 07:54 PM
system call used by SIZE command santosh.sajjan Linux - Newbie 4 05-11-2010 10:02 AM
Command folder size Ataraxos Linux - Newbie 8 04-03-2005 12:09 PM
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 04:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration