我有一个系统,我想做一些清理工作,所以我想获取所有用户帐户和他们访问邮件的最后日期。它是一个 Debian 系统。
到目前为止,我得到了这个:
cut -d: -f1 /etc/passwd | xargs -n1 finger | grep "Mail last read"
但我不知道如何在 Mail 前面写下那个用户名 last read Sun Aug 12 03:06 2012 (CEST)
谢谢编辑:这是示例手指输出:
/bla# finger xxxxx
Login: xxxxx Name: xxxxx xxxxx
Directory: /home/xxxxx Shell: /bin/true
Never logged in.
Mail last read Sun Aug 12 03:17 2012 (CEST)
No Plan.