I'm am currently trying to figure out a command that will show the last password change of a user on a UNIX system.
I have tried running the command passwd -Sa and it gives the password change date formatted in 00/00/0000. However I want to only list the date of the last user from that command. I have tried piping the command to grep, but I can't seem to get my syntax correct.
I'm looking for just the date output as the result of this command.
Current command attempted:
grep $USER | passwd -Sa
Any help on my errors is appreciated!