./ [WAS: Re: Terminal Syntax]

Greg Booth bootgr at gmail.com
Mon Jun 25 13:35:25 UTC 2007


On 6/25/07, James Heaver <james at heaver.org> wrote:
>
>
> On 25/06/07, Greg Booth <bootgr at gmail.com> wrote:
> >
> >
> > Then to run ANY windows executable from the command line it's simply
> > wine ./<EXE NAME> so a file setup.exe would be ( assuming you're in
> > the directory where the executable is located )
> >
> > wine ./setup.exe
> >
> > The . is important so make sure to include it.
>
>
> What does the ./ mean, I've seen it in this, and other contexts (compiling
> form source perhaps) and never known what it does.

the dot to look in the current directory. Unlike windows that
automatically contains your working directory in the search path for
executables linux only includes necessary directories such as /usr/bin
/usr/sbin and /usr/local/bin where the majority of your binaries
reside.

Why they do this I'm not 100% sure, I believe it's for security. For
example if I could drop a new binary called ls into your root drive,
the next time you typed ls to get a listing of files in a directory
you'd be running the hacked virus version, and not the version in
/usr/bin like you should be. To run the version in your root directory
you'd have to type out the full ./ls

Hope that helps.

Greg Booth




More information about the kubuntu-users mailing list