Open ProjektPhoenix opened 3 months ago
The equivalent in macOS
dscl . -read /Users/$(whoami) NFSHomeDirectory | awk '{print $2}'
(from copilot)
The dscl
(Directory Service command line) utility on macOS is used to interact with Directory Services. Directory Services is a system service in macOS that stores and manages information about users, groups, and other resources on the system. This includes user account details, such as user IDs, home directories, and group memberships.
The dscl
command can query, create, and modify entries in the Directory Services database. It's commonly used for tasks such as:
A typical use of dscl
to query the current user's home directory is as follows:
dscl . -read /Users/$(whoami) NFSHomeDirectory
This is a nice to have but not crucial
I think it mostly works.
read HOME dir through
the UID could be obtained through sig info or even easier: /usr/bin/id call to execve gives UID as first entry