我如何才能了解真实/ ogiginal用户名?
在linux上,我们可以运行下面的命令,它会根据链接给出真正的用户名,但是java的等价物是什么?
REALUSERNAME=$(ps uhp `ps -AjH | grep \`ps -u $USER fh | awk '{ print $0; if(index($0, "ps -u $USER fh")) exit 0;}' | tac | awk '{if(!index($0, "\\\\\_")){print $1; exit 0;}}'\` | awk '{print $3}'` | awk '{print $1}')
How can I find out the original username a process was started with?