18
如何以編程方式確定當前Cygwin用戶的Windows格式主目錄(例如C:\ cygwin \ home \ user),以便我可以從Cygwin Bash之外讀取它?如何獲取Cygwin主目錄的Windows路徑?
如何以編程方式確定當前Cygwin用戶的Windows格式主目錄(例如C:\ cygwin \ home \ user),以便我可以從Cygwin Bash之外讀取它?如何獲取Cygwin主目錄的Windows路徑?
您可以使用cygpath
......
==> cygpath -w ~
C:\Users\dhaley