xcode Mac OS X 用户配置文件文件夹?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16204837/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Mac OS X User Profile folder?
提问by Codename K
Does anybody know the default environment variables in MAC OS X? What is the variable for user's folder?
有人知道 MAC OS X 中的默认环境变量吗?用户文件夹的变量是什么?
For example if the path in MAC OS X is "/Users/someuser/Applications" Then what is the variable for the "someuser"?
例如,如果 MAC OS X 中的路径是“ /Users/someuser/Applications” 那么“ someuser”的变量是什么?
回答by Barmar
Just like on other Unix systems, it's $USER
and $LOGNAME
. And $HOME
is the path to the home directory /Users/someuser
.
就像在其他 Unix 系统上一样,它是$USER
和$LOGNAME
. 并且$HOME
是主目录的路径/Users/someuser
。