How do I find the home directory of an arbitrary user from within Grails? On Linux it\'s often /home/user. However, on some OS\'s, like OpenSolaris for example, the path i
For UNIX-Like systems you might want to execute "echo ~username" using the shell (so use Runtime.exec() to run {"/bin/sh", "-c", "echo ~username"}).
echo ~username
Runtime.exec()
{"/bin/sh", "-c", "echo ~username"}