Finding the path to a executable?
Andre Artus
andre.artus at gmail.com
Tue Aug 6 23:08:43 PDT 2013
On Wednesday, 7 August 2013 at 05:31:24 UTC, Alan wrote:
> Hello! This may seem like a simple question, maybe an
> embarassing question but how would I fetch the absolute path to
> the directory where my executable is located? My wording is
> known to be confusing so I will give an example:
>
> cd ~/projects/program
> dmd Program.d -ofProgram
>
> That executable would be located in /home/alan/projects/program
> for example. SO my question is how would I fetch the absolute
> path to that directory?
>
> Thanks for any help!
Is this what you are looking for?
find ~/projects/program/ -type f -perm +111
or
ls -d -1 ~/projects/program/*
More information about the Digitalmars-d
mailing list