Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
1  
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.