【问题标题】:How to I find the full path of an application or file in linux?如何在 linux 中找到应用程序或文件的完整路径?
【发布时间】:2019-08-22 23:02:37
【问题描述】:

我必须在 matlab 脚本中手动添加多个文件的路径,即我的 matlab 目录或 startup.m,但我不确定如何在 unix 系统上找到其中任何一个的完整文件路径

我试过 find,其中,whereis,但似乎没有一个提供完整的文件路径

matlab 是什么

找matlab

【问题讨论】:

    标签: matlab path directory


    【解决方案1】:

    matlabroot 返回 MATLAB 的安装目录:

    p = matlabroot;
    

    MATLAB 可执行文件通常位于fullfile(matlabroot,'bin','matlab')

    要查找 M 文件在 MATLAB 路径上的位置,请使用 which

    p = which('startup')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-16
      • 2021-04-24
      • 2023-04-10
      • 1970-01-01
      • 2015-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多