🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.linux
Article #56360

Re: What does linux use for a path

#56360
From: Halcon Milenario
Date: Tue, 18 Mar 1997 00:00
61 lines
2853 bytes
Mark Williamson wrote:
> 
> Thanks to those who answer my last post via private mail.
> 
> All I needed to do is add the path when typing on the command line..  e.g.
> /a.out.
> 
> Now for my next question, what use or how can I set a certain dir like the
> path statment in dos, so that all I do is type the exicutable file name on
> the command line.
> 
> Thanks
> 
> Mark Williamson <mark@express.bbs.net.au> wrote in article
> <01bc310e$11b1cf20$3400a8c0@oldsys>...
> > Hi There,
> >
> > I have been tring to work out how to program in C++ for Linux..   I
> manage
> > to write some c++ code call welcome.C via using a editor called emacs...
> > Then I compiled the code using the g++ command e.g. g++ wlcome.C, it
> seemed
> > to complied O.K. and created a file call a.out..   Now I am new to linux
> > but if I was to run a file say something like a.exe, from DOS, all I
> would
> > do is go to the dir where the file was and type the command "a", and the
> > file would run..
> >
> > How would one setup linux so that the file a.out would run from a certain
> > dir?

Mark:
	To set a PATH under linux, like under any other UNIX operating system,
you must set the environment variable called PATH - very similar to
MS-DOS.
- To set the PATH variable, if you use a shell called bash - which is
the most frequently used -, you just have to type:
	export PATH=<here goes your path>
Be aware  of this:
* The separator for directories in the PATH string is the colon ( : ).
* If you want to be able to run a file just typing its name, you must
include in the path the current directory, like this:
	export PATH=$PATH:/.
(the variables in UNIX must be referenced by writing a $ before their
name. This means that, wherever you want to substitute the identifier
with the variable's value, you must put a leading $. Notice that, in
assignements, the left variable does not have the $).

* Here is a typical path for Linux:
	export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/.

Also NOTICE that executable filenames in Linux don't have any special
extension, like .EXE or .COM.
If you have any doubt, don't bother asking me via e-mail (
acapella@arrakis.es ).
	Good luck!
-- 
   Que la Fuerza te acompa�e...
   - "May the Force be with you..." -                     Halcon
Milenario
Technical Details
Message-ID: <332F3A49.377D947@arrakis.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bc310e$11b1cf20$3400a8c0@oldsys> <01bc319d$85413180$3400a8c0@oldsys>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 102983,a98b80d502683bf9
X-Google-Attributes: gid102983,public
From: Halcon Milenario <acapella@arrakis.es>
Subject: Re: What does linux use for a path
Date: 1997/03/18
Message-ID: <332F3A49.377D947@arrakis.es>
X-Deja-AN: 226558909
References: <01bc310e$11b1cf20$3400a8c0@oldsys> <01bc319d$85413180$3400a8c0@oldsys>
To: Mark Williamson <mark@express.bbs.net.au>
Organization: Unisource Espana NEWS SERVER
Newsgroups: aus.computers.linux