在MacOS上应将cp oc二进制文件放在哪里? [英] Where should I cp oc binary to on MacOS?
问题描述
此文档说
解压缩档案并将oc二进制文件移至PATH上的目录
unpack the archive and move the oc binary to a directory on your PATH
我尝试了echo $PATH
,它返回:
bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
这里显然有多条路径,我应该将cp oc二进制文件移到哪一条路径上?
Clearly there are multiple path here, which one should I move cp oc binary to?
推荐答案
/usr/local/bin
是用户或第三方可执行文件的通常选择.这样,在您更新操作系统时,它就不会消失.
/usr/local/bin
would be the usual choice for user or third-party executables. That way it won't get wiped out when you update the OS.
另请参见:您在OSX上将自己的脚本保存在哪里?-问题是关于脚本而不是二进制文件,但逻辑相同.
See also: Where do you keep your own scripts on OSX? - the question is about scripts rather than binaries, but the same logic applies.
这篇关于在MacOS上应将cp oc二进制文件放在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!