LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-01-2007, 08:30 AM   #1
scbops
Member
 
Registered: Feb 2006
Posts: 97

Rep: Reputation: 15
partion size identification


How do I identify the partion size in mega butes. fdisk -l will show only the number of block's and unit's.
 
Old 03-01-2007, 09:39 AM   #2
scbops
Member
 
Registered: Feb 2006
Posts: 97

Original Poster
Rep: Reputation: 15
sfdisk -luM is this ok
 
Old 03-01-2007, 11:00 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Yes

Example:
sfdisk -luM

Disk /dev/sda: 6608 cylinders, 255 heads, 63 sectors/track
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End MiB #blocks Id System
/dev/sda1 * 0+ 101- 102- 104391 83 Linux
/dev/sda2 101+ 51834- 51733- 52974337+ 8e Linux LVM
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty


The above shows you partition 1 on disk sda is 102 MB (MiB) and partition 2 is 51733 MB (MiB). You could also figure this out without the -uM flag by looking at the line in sfdisk -l output that contains:
"blocks of 1024 bytes"

So 104391 * 1024 = bytes in sda1
52974337 * 1024 = bytes in sda2

Dividing the answers for above by 1048576 would convert the bytes into megabytes. This would be a little more exact that the MiB column as that one is rounding up to the nearest whole number.
 
Old 03-02-2007, 02:20 AM   #4
scbops
Member
 
Registered: Feb 2006
Posts: 97

Original Poster
Rep: Reputation: 15
Thanx..................
 
  


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
NIC Identification belkins Linux - Hardware 2 05-24-2005 02:31 PM
Change NTFS Partion Size iotc247 Slackware 7 05-03-2004 10:40 PM
how do i move files from my windows partion to my linux partion awesome_man Linux - Newbie 2 01-30-2004 12:51 PM
Must "/boot" partion be installed in the primary partion? domeili Linux - Newbie 9 11-01-2003 08:27 AM
largest recommended partion size gwroy20 Linux - General 2 09-07-2003 08:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:52 AM.

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