Take the 2-minute tour ×

I have to manually edit a FAT 16 partition. After trying few hex editors, I decided to try Emacs Hexl.

sudo emacs -> M-x hexl-find-file -> /dev/sdb

The commands open device file but its empty, although others hex editors (including 'sudo cat /dev/sdb') show its content.

Why so?

Thank you.

share|improve this question

2 Answers 2

IMHO, There is no way to read/write device file in Emacs.

See also http://www.emacswiki.org/emacs/EmacsLispLimitations

share|improve this answer
Any hex editor can, so it looks like to be the Emacs's fault. –  SkyDan Dec 9 '11 at 13:32

Trying to open the entire drive at once would be far too big. Use dd to transfer parts of the disk to/from a file and edit the file in hexl mode.

share|improve this answer

Your Answer


