LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2003, 07:52 PM   #1
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Rep: Reputation: 15
mkfs not working in Red Hat 9 ?


I was trying to use the mkfs command (in Red Hat 9 - before I found the Floppy Formatter in KDE), and it said that that mkfs command was not found...I'm confused because this book, Red Hat 9 Bible, which was where I obtained my Red Hat 9 distribution, instructs me to use mkfs to make a specific file system...and it clearly doesn't work.

It's not a huge pressing issue for me now that I've found the floppy formatter in KDE, but I'm still curious.

Thanks.
 
Old 09-25-2003, 08:44 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Is the command in your path?

find / -name mk2fs

or

locate mk2fs
 
Old 09-25-2003, 09:08 PM   #3
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
When I do locate mkfs, I get the following:

$ locate mkfs
/usr/share/man/man8/mkfs.ext2.8.gz
/usr/share/man/man8/mkfs.ext3.8.gz
/usr/share/man/man8/mkfs.8.gz
/usr/share/man/man8/mkfs.msdos.8.gz
/usr/share/man/man8/mkfs.vfat.8.gz
/usr/share/man/man8/mkfs.jfs.8.gz
/sbin/mkfs.ext2
/sbin/mkfs.ext3
/sbin/mkfs.cramfs
/sbin/mkfs
/sbin/mkfs.msdos
/sbin/mkfs.vfat
/sbin/mkfs.jfs
/sbin/mkfs.reiserfs

Am I maybe just using the syntax incorrectly ?
 
Old 09-25-2003, 09:11 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Are you logged in as root? You have to be root to run this command. If it doesn't work as root, then you don't have the /sbin in your $PATH. To run the command, you will have to specify the full path to it until you added /sbin to your $PATH

/sbin/mkfs

I guess they named it mkfs instead of mk2fs as well...
 
Old 09-25-2003, 09:12 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Also it appears they've made a command for each type of filesystem as well.. notice you have mkfs.ext2, mkfs.ext3 and so on in your /sbin directory.. ?
 
Old 09-25-2003, 09:22 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
locate is a utility to find files on your system. You see that mkfs is located in the /sbin directory.

/sbin is usually not in a users path so that is why there was a command not found error.

./ means the current directory, ../ means one level up.

To see your path environment
echo $PATH

man is the online help pages
example:
man mkfs
 
Old 09-25-2003, 09:24 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Were you thinking of mke2fs
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
es1878 not working in red hat 9 tava Linux - Hardware 0 09-15-2004 01:34 AM
GUI not working in Red hat 9.0 jhelpme1212 Linux - Hardware 1 04-22-2004 03:12 AM
loadkeys not working in red hat 9 log Linux - General 3 02-10-2004 03:50 PM
Red Hat 9 WEP Not working dappers Linux - Hardware 0 09-10-2003 06:40 AM
Sound Not Working for Red Hat 8.0 iancork01 Linux - Software 5 03-27-2003 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07: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