获取 Solaris 中的活跃用户列表[在过去 6 个月内至少连接过一次的用户]。
问问题
1202 次
1 回答
1
You could solve this by creating a script that date stamps a file somewhere when any user logs in. it could be run by the shell's system-wide init (/etc/profile for bourne compatible shells)
for instance, create a directory called /var/log/logintimes
and have /etc/profile run touch /var/logintimes/$USER
then, to see the last login time, do ls -l /var/logintimes
于 2012-07-19T13:06:04.560 回答