In AIX we can view raw data of hdisk by issuing following comamand

lquerypv -h /dev/hdisk0

This displays data in hexa decimal format. More of like hex editor.

What is the equivalent command in Linux based system

  • 1
    hexdump? What info are you after?
    – Mat
    Commented May 1, 2016 at 16:42
  • for asm database luns should be formatted. so before executing dd if=/dev/zero of=/dev/hdiskX we usually do lquerypv. I was wondering if the equivalent command is available in linux
    – Sagar
    Commented May 1, 2016 at 17:07
  • Can you provide expected output? Commented May 1, 2016 at 18:40

2 Answers 2


Look I think that you can replace the command you need with the following

sudo cat /dev/sda2|head -n 5|strings

You can change the number of head lines as you want and you can also remove the head part and append a "less" to go through all the required disk or whatever

sudo cat /dev/sda2|strings|less

This is what i was looking for. Finally i got it with the help of cfdisk command.

cfdisk -P r /dev/sda

Where sda is your disk, P is for printing partition table to screen and r is for print raw output.
Here is the sample output.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .