Re: how to get the size of a disk partition from user space?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07:55 Sun 18 May     , Robert P. J. Day wrote:
> 
>   possibly slightly off-topic, but i've been handed (not at hand at
> the moment, though) an embedded system running 2.4.26, which has a
> bunch of flash-based partitions corresponding to the device files
> /dev/scsi/host-?/bus0/target0/lun0/part-?.
> 
>   what i want is a quick way to determine the size in bytes of those
> partitions.  will there be entries for them in /proc/partitions?  is
> there a better way?  they won't necessarily be mounted; in fact, they
> probably won't be.  thoughts?  thanks.

cat /sys/block/hda/hda1/size
	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux