LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-10-2011, 08:41 PM   #1
rithi143
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Rep: Reputation: Disabled
doubt in commands


tell me differences between mkfs and mke2fs. are they doing the same work? if yes means then why they are using two names for the same function.
 
Old 10-10-2011, 08:57 PM   #2
rameshshihora
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Rep: Reputation: 0
Hello,

Actually both the commands is use to create the filesystem.

>>>>>
mkfs - mkfs is simply a front-end for the various file system builders (mkfs.fstype) available under Linux
I think there is a limitation to create the Journaling file system using mkfs command.

It has the below option to create the defaile file system which is ext2.

-t fstype
Specifies the type of file system to be built. If not specified, the default file system type (currently ext2) is used.
>>>>>

mke2fs - create an ext2/ext3/Journal filesystem
- There is confiuration file called /etc/mke2fs.conf where you can mentioned default paramter of file systems.

For the further details .. you should read manual pages for both this command.

Thnaks & Regards,
Ramesh Shihora
 
Old 10-10-2011, 09:09 PM   #3
rithi143
LQ Newbie
 
Registered: Sep 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
ya both commands are used for creating filesystem. As per ur reply i think mke2fs have the configuration file where mkfs does not have config file.
 
Old 10-11-2011, 08:37 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Welcome to LQ!
Quote:
Originally Posted by rithi143 View Post
ya both commands are used for creating filesystem. As per ur reply i think mke2fs have the configuration file where mkfs does not have config file.
I do suggest that you read the man page for 'mkfs';
Quote:
excerpt from 'man mkfs';
NAME
mkfs - build a Linux file system

SYNOPSIS
mkfs [-V] [-t fstype] [fs-options] filesys [blocks]

DESCRIPTION
mkfs is used to build a Linux file system on a device, usually a hard disk partition. filesys is
either the device name (e.g. /dev/hda1, /dev/sdb2), or a regular file that shall contain the
file system. blocks is the number of blocks to be used for the file system.

The exit code returned by mkfs is 0 on success and 1 on failure.

In actuality, mkfs is simply a front-end for the various file system builders (mkfs.fstype)
available under Linux. The file system-specific builder is searched for in a number of directo-
ries like perhaps /sbin, /sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise list is defined at com-
pile time but at least contains /sbin and /sbin/fs), and finally in the directories listed in the
PATH environment variable. Please see the file system-specific builder manual pages for further
details.
Please read the last paragraph for understanding. Once you do, then realization to the fact 'mkfs' is just the front end for particular file system builders on the system in use.

Read the man page and at the bottom you will see references to 'mkfs.fstype' within the 'See Also'. You could then 'man command' for the particular builder.
HTH!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubt concerning keeping record of all commands executed with sudo or as root: Maragato Linux - Security 2 05-14-2011 09:06 AM
what is the similarity between linux commands and dos commands kamalkirat1 Linux - Software 6 11-21-2008 08:54 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - Software 2 07-02-2008 06:26 PM
Need help for Windows cmd commands into Linux terminal commands. windowsNilo Linux - General 2 07-01-2008 06:53 AM
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration