Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-29-2004, 09:54 PM
|
#1
|
Member
Registered: Aug 2004
Posts: 38
Rep:
|
bash connot find the command
I am having quite a bit of trouble intering commands in the terminal. It keeps saying bash doesnt know what im talking about. Do I need to change it so its running somting else while I do the commands? I have no idea what to do so any help would be great.
|
|
|
08-29-2004, 10:01 PM
|
#2
|
LQ Newbie
Registered: Aug 2004
Posts: 14
Rep:
|
what command(s)?
If something is not in your $PATH, and you don't give it a full path, it won't know where to find it.
Example:
[z@z ~]echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home/z/bin
Anything that is /not/ in one of those directories won't run, unless you specifiy the full path:
[z@z ~]cp /bin/ls /tmp/somecommand
[z@z ~]somecommand
-bash: somecommand: command not found
[z@z ~]/tmp/somecommand
(normal 'ls' output here)
Running 'somecommand' didn't work, because it is not in my $PATH, so I had to give it the full path. Does this help?
|
|
|
08-29-2004, 10:08 PM
|
#3
|
Member
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828
Rep:
|
try to locate the command
whereis "command" without quotes
if the command is something like /usr/bin/command
enter the full path of the executable in shell to invoke.
|
|
|
08-29-2004, 10:09 PM
|
#4
|
Member
Registered: Aug 2004
Posts: 38
Original Poster
Rep:
|
perhaps I am entering it wrong. the commands that I am trying to use are mkfs and cfdisk. I am trying to make a hard drive that is labled as free space to be usable. I enter terminal and then su to root. for cfdisk I put: cfdisk /dev/hdb
for mkfs I use: mkfs.ext3 /dev/hdb is that even close to right?
|
|
|
08-29-2004, 10:13 PM
|
#5
|
Member
Registered: Aug 2004
Posts: 38
Original Poster
Rep:
|
mike...i dont really understand what you are suggesting
|
|
|
08-29-2004, 10:35 PM
|
#6
|
Member
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828
Rep:
|
To locate cfdisk:
linux:/home/miked # whereis cfdisk
cfdisk: /sbin/cfdisk /usr/share/man/man8/cfdisk.8.gz
linux:/home/miked #
To execute cfdisk:
linux:/home/miked # /sbin/cfdisk -- this will enter a new terminal session
[2]+ Stopped /sbin/cfdisk
linux:/home/miked #
To locate mkfs:
linux:/home/miked # whereis mkfs
mkfs: /sbin/mkfs.msdos /sbin/mkfs.vfat /sbin/mkfs.xfs /sbin/mkfs.ext2 /sbin/mkfs.ext3 /sbin/mkfs.reiserfs /sbin/mkfs.jfs /sbin/mkfs.bfs /sbin/mkfs /sbin/mkfs.cramfs /sbin/mkfs.minix /usr/share/man/man8/mkfs.8.gz
--from this i know mkfs is locate in my /sbin/ directory
To execute mkfs:
linux:/home/miked # /sbin/mkfs
Usage: mkfs [-V] [-t fstype] [fs-options] device [size]
linux:/home/miked #
|
|
|
08-29-2004, 10:36 PM
|
#7
|
Member
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828
Rep:
|
But for each of those commands as root i could just as easily typed
cfdisk
and
mkfs
To get the information on these commands: type man "yourcommandinquestion" without quotes
linux:/home/miked # man mkfs
Reformatting mkfs(8), please wait...
[3]+ Stopped man mkfs
linux:/home/miked # man cfdisk
Reformatting cfdisk(8), please wait...
linux:/home/miked #
Make sense now?
Last edited by mikedeatworld; 08-29-2004 at 10:38 PM.
|
|
|
08-29-2004, 11:03 PM
|
#8
|
Member
Registered: Aug 2004
Posts: 38
Original Poster
Rep:
|
yea more
I am goin to go try it out. thanks a bunch
|
|
|
08-29-2004, 11:24 PM
|
#9
|
Member
Registered: Aug 2004
Posts: 38
Original Poster
Rep:
|
so i got it to work...mostly. I su for root, then typed whereis cfdisk. all the happened is it dropped a line and printed cfdisk: i dunno
i did the same with mkfs but it printed /sbin/mkfs.ext2 /sbin/mkfs.ext3 etc so I typed /sbin/mkfs.ext3 /dev/hdb and it said it didnt have partitions did i want to continue anyway. I did and it seems to have worked. now i can mount it. the only thing is that i cant unmount it. it says its busy, even when i close everything. do you know whats going on? oh and the cfdisk: must mean i dont have that app/program right?
|
|
|
08-30-2004, 08:04 AM
|
#10
|
Member
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828
Rep:
|
Try just typing cfdisk in a shell to run that...
Also, just try typing is a shell mkfs to run that...
Too force the unmount you could try as root umount -f /dev/hdb
or
fuser -k /device
Last edited by mikedeatworld; 08-30-2004 at 08:09 AM.
|
|
|
All times are GMT -5. The time now is 09:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|