hard links - Re: [TriLUG] mkfs vs mke2fs

Jeremy Portzer jeremyp at pobox.com
Fri May 14 10:49:56 EDT 2004


On Fri, 2004-05-14 at 09:44, davis wrote:
> On Fri, May 14, 2004 at 09:24:38AM -0400, Ryan Leathers wrote:
> > Can someone explain to me the practical differences between mkfs and
> > mke2fs?
> > 
> 
> Hello Ryan,
> 
> I believe they are the same thing for ext2/3.  They are named differently 
> for ease of use.  In the past, I have seen one be a link
> to another.  However, on my current debian unstable sparc box, 
> I have three exact copies (not links) of the same program.
> 
> ie.:
> 
> -rwxr-xr-x    3 root     root        30392 Apr 12 19:10 /sbin/mke2fs*
> -rwxr-xr-x    3 root     root        30392 Apr 12 19:10 /sbin/mkfs.ext2*
> -rwxr-xr-x    3 root     root        30392 Apr 12 19:10 /sbin/mkfs.ext3*

Actually, now would be a good time to remember what we talked about last
night about hard links.  Note that there is a "3" next to "root" in the
the long listing.  This means that there are three (hard) links to the
file.  I would guess that these files really are the same (hard
linked).  The way to determine this for sure is to run "ls -li".

Note that many programs that have linked versions (either hard or
soft/symbolic), will behave differently based on how they're called.  

To get back to Ryan's original question, note that mkfs is usually a
"wrapper" program that decides which sub-program to call based on the -t
flag for filesystem type.  So while there is no difference between
mke2fs and mkfs.ext2 and mkfs.ext3, mkfs is a different program.  mkfs
can call the others like minix, cramfs, etc, if needed.  The man page
for mkfs should explain this.

This help any Ryan?

--Jeremy


-- 
/---------------------------------------------------------------------\
| Jeremy Portzer        jeremyp at pobox.com      trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040514/14c15412/attachment.pgp>


More information about the TriLUG mailing list