目前看到最优雅的解决方案 : last | awk -v FIELDWIDTHS='9 30 16' '{print $1 $3}'
test@test:~$ last | awk -v FIELDWIDTHS='9 30 16' '{print $1 $3}'
test Tue Sep 15 14:39
test Mon Sep 14 08:38
test Mon Sep 14 03:32
test Mon Sep 14 03:31
test Mon Sep 14 03:22
test Mon Sep 14 03:00
test Mon Sep 14 02:11
test Sun Sep 13 11:34
test Sun Sep 13 11:33
test Sun Sep 13 10:53
reboot Sun Sep 13 10:53
test Wed Sep 9 08:39
test Wed Sep 9 07:04
reboot Wed Sep 9 03:06
reboot Wed Sep 9 03:04
test Wed Sep 9 03:03
reboot Wed Sep 9 03:03
test Wed Sep 9 03:02
test Wed Sep 9 02:51
reboot Wed Sep 9 02:50
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…