LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 08-29-2004, 09:54 PM   #1
Dunadan1821
Member
 
Registered: Aug 2004
Posts: 38

Rep: Reputation: 15
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.
 
Old 08-29-2004, 10:01 PM   #2
tmp_versions
LQ Newbie
 
Registered: Aug 2004
Posts: 14

Rep: Reputation: 0
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?
 
Old 08-29-2004, 10:08 PM   #3
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
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.
 
Old 08-29-2004, 10:09 PM   #4
Dunadan1821
Member
 
Registered: Aug 2004
Posts: 38

Original Poster
Rep: Reputation: 15
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?
 
Old 08-29-2004, 10:13 PM   #5
Dunadan1821
Member
 
Registered: Aug 2004
Posts: 38

Original Poster
Rep: Reputation: 15
mike...i dont really understand what you are suggesting
 
Old 08-29-2004, 10:35 PM   #6
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
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 #
 
Old 08-29-2004, 10:36 PM   #7
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
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.
 
Old 08-29-2004, 11:03 PM   #8
Dunadan1821
Member
 
Registered: Aug 2004
Posts: 38

Original Poster
Rep: Reputation: 15
yea more
I am goin to go try it out. thanks a bunch
 
Old 08-29-2004, 11:24 PM   #9
Dunadan1821
Member
 
Registered: Aug 2004
Posts: 38

Original Poster
Rep: Reputation: 15
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?
 
Old 08-30-2004, 08:04 AM   #10
mikedeatworld
Member
 
Registered: Nov 2003
Location: Farmington Michigan
Distribution: UBUNTU - Slackware - SuSE 9.1 - Knoppix - Fedora
Posts: 828

Rep: Reputation: 30
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.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
trouble with find command in bash vrdhananjay Linux - Newbie 3 10-30-2004 11:37 PM
bash cant find format or mkfs command Dunadan1821 Linux - Software 3 08-12-2004 01:27 PM
Is this a valid command? find ./ -name bash.bashrc | cat davidas Linux - Newbie 11 04-06-2004 02:16 AM
same find command not working in bash script, quotes? QuakerOatz Linux - Software 1 07-14-2003 12:04 PM
Installing Linux-2.4.20: Make menuconfig, connot find ncurses SparceMatrix Linux From Scratch 3 06-12-2003 07:42 PM


All times are GMT -5. The time now is 10:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration