On Linux, fdisk supplies this information without any problems. I can't seem to do the same anywhere in Windows, nor (at a glance) in diskpart which is intended to succeed/replace fdisk.
I need to find the low and high cylinder of a CF card, number of heads, sectors per track, and sector size in bytes. The usual stuff.
How do I do that? Is there a native interface to get this information, or do I have to install a 3rd-party utility or boot a Linux liveCD?
Best Answer
You can do it natively in Windows, using the Windows Management Instrumentation Command-line (WMIC) interface. In this case, the command you want is
wmic diskdrive
, which returns theWin32_DiskDrive
class. You can execute it from CMD or PowerShell.From the system I'm writing this from, for example:
(I redacted the serial numbers and system name with
########
.)As you've probably noticed, the line length on this is rather long, so you'll want to be selective about the properties you have returned, have it output in one property per line (
wmic diskdrive list /format:list
), pipe the output to a file, and/or set your console width to be very large before running the command, because it will be basically illegible if line wrapping kicks in.