Finding directory containing executable for compiled application
9 ビュー (過去 30 日間)
古いコメントを表示
I need to get the path of the executable for a compiled application. This answer appears to solve the problem for Windows, but does not work for Linux
I tried replacing 'path' with 'echo $PATH' but it still doesn't work as the folder where the executable is located is not on the path in Linux.
Is there any alternate solution?
0 件のコメント
採用された回答
Harsha Medikonda
2015 年 8 月 18 日
Hi Aditya,
I understand that you are looking for a similar solution of finding the directory containing executable for a compiled application on Linux.
On Linux you can retrieve the directory containing the compiled executable using the following code
[~,exeloc] = system(sprintf('readlink -f /proc/%d/exe',feature('getpid')));
Regards,
Harsha
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!