I'm trying to preview run commands with the args with D-trace. I tried something like this:
sudo dtrace -n 'syscall::execve:return {printf("%s\n", curpsinfo->pr_psargs);}'
But on OSX this code returns only commands names not their args.
I find this forum thread but code in last answer doesn't works for me.