- FILE SYSTEMS MAGIC NUMBER
- Posted by oxfordite on February 27th, 2004
hi,
every fs has a 'magic number' in the superblock.
can anyone tell what is the 'magic number' and what is it used for?
- Posted by Joe Beanfish on February 27th, 2004
On 27 Feb 2004 01:17:49 -0800, oxfordite <cdac_proj@yahoo.co.in> wrote:
To identify itself as itself.
- Posted by Dances With Crows on February 27th, 2004
On Fri, 27 Feb 2004 14:01:22 -0500, Joe Beanfish staggered into the
Black Sun and said:
To expand on Joe's answer, the magic number in a filesystem is supposed
to be a unique tag. Every ext[23] filesystem has 0xEF53 at byte offset
0x438, for instance. If you have a filesystem that doesn't have that
magic number in that exact place, it's not an ext[23] filesystem.
Similar things exist for ReiserFS, JFS, XFS, and all other filesystems.
HTH,
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
- Posted by Floyd L. Davidson on February 27th, 2004
Dances With Crows <danSPANceswitTRAPhcrows@usa.net> wrote:
To expand on that a bit more (greatly), take a look at
/etc/magic, which is a database matching up the above magic
numbers, plus many more, to a multitude of different types of
files. And, you can read the man page for magic(5) and file(1)
also, for how to make use of magic numbers.
--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com