• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running a binary from Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running a binary from Terminal


  • Subject: Re: Running a binary from Terminal
  • From: Justin Walker <email@hidden>
  • Date: Tue, 2 Nov 2004 11:58:54 -0800

A minor nit:

On Oct 26, 2004, at 14:02, Chris Espinosa wrote:

On Oct 26, 2004, at 1:28 PM, Kanlisha wrote:
 I need help on running a binary from the command line ... in the
 terminal window ... bash shell ...

<snip>

 But when I enter the name, as a command -
 $ fgfs-0.9.3-11-22-03
 the system reports 'command not found' ... yuk!

The Shell prohibits you from executing files in the current directory by entering the file name, as a safety precaution. Try:


$ ./fgfs-0.9.3-11-22-03

Your answer is correct, but your explanation really is not. Most shells have a list of directories (the PATH environment variable) which they use to look for executables. If you type a name without the '/' character, the shell will search that list for an executable of that name.


By default (as you say, for security purposes), the "current directory" is not included in that list, but the user can easily add it. The shell itself has no 'security policy' built in.

Consult the shell manual pages (e.g., "man bash", "man tcsh") for details for specific shells.

Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large  *
Institute for General Semantics        | Some people have a mental
                                       |  horizon of radius zero, and
                                       |  call it their point of view.
                                       |     -- David Hilbert
*--------------------------------------*-------------------------------*

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Fwd: Code optimisation always -0s [again :)]
  • Next by Date: Re: project constantly being rebuilt
  • Previous by thread: Re: Return key doesn't in Xcode editor
  • Next by thread: Multiple editor windows.
  • Index(es):
    • Date
    • Thread