Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard network printer problem ram registry router security slow software sound toshiba trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
How do you determine what's in your path

Reply  
Thread Tools
royeo's Avatar
Computer Specs
Member with 158 posts.
 
Join Date: Jul 2006
Experience: Intermediate
08-Jun-2007, 03:18 AM #1
How do you determine what's in your path
I have Fedora Core 6 and use KDE.

I tried to install a new graphics driver and in an error message it said it couldn't locate file cc. Then it said maybe cc isn't in your path. How can determine what's in your path, also, how would you include the path to a certain file in your path?

Thanks,

royeo
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
08-Jun-2007, 12:31 PM #2
Quote:
Originally Posted by royeo
I have Fedora Core 6 and use KDE.

I tried to install a new graphics driver and in an error message it said it couldn't locate file cc. Then it said maybe cc isn't in your path. How can determine what's in your path, also, how would you include the path to a certain file in your path?

Thanks,

royeo
Hi royeo,

The quickest way to determine the location of cc (if you both have cc and its directory is in your path) is to issue the command:

which cc

If you do not have cc then you may have gcc, so issue: which gcc

If you have gcc, there should be a symbolic link from cc to gcc.

To determine what directories are in your path, issue the command: echo $PATH

Read the man page for bash (if that is your default shell), and specifically look up the set builtin command under BUILTIN COMMANDS (the man page is a long file).

The set command would be issued as a regular command in a terminal window.

You can add a new directory to your path by issuing the set command, e.g.:

set PATH=$PATH:<new dir>

where <new dir> would be replaced by the full path name of <new dir> and append the new directory path to the end of the PATH variable.

If you don't have either cc or gcc, then your best option is to download the gcc .rpm package from the Fedora website via an update or a direct download and then install it with the rpm command. Note: read the rpm man page.

-- Tom

P.S. Go to your local bookstore (Barnes and Noble) and buy a book on Red Hat Linux Fedora.
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
ghostdog74's Avatar
Member with 146 posts.
 
Join Date: Dec 2005
09-Jun-2007, 01:36 AM #3
IMO the best way to locate a certain command like your example cc or gcc, is to do a thorough search from /.
Code:
find / -type f  \( -name "cc' -o -name "gcc" \) -print
say if you have found them and know where they are located, you can include them in either your profile, or the script that is going to call the cc/gcc commands.
to do it in your profile or the script, depending on which distro you have,
- vi your profile
- add PATH=$PATH:<your cc path here, found by find>
- export PATH
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:00 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.