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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:16:24  来源:igfitidea点击:

Mac OS X User Profile folder?

xcodemacosglobal-variablesenvironment-variablesuser-profile

提问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 $USERand $LOGNAME. And $HOMEis the path to the home directory /Users/someuser.

就像在其他 Unix 系统上一样,它是$USER$LOGNAME. 并且$HOME是主目录的路径/Users/someuser