I am trying to parse the audit log to find a particular date that associated with a user record. The Date and the context of the record that I need to extract from the audit.log are 11-07-2015, the username and the activity he or she performed that day.
Here is my code:
grep -c date -d "11-07-2015 +%m%d%y" sudo /var/log/audit/audit.log
Here is my code. The first part of the code extract username from the passwd file
and the second part of the code adds a username to auid field and converts audit dates into readable dates. The audit.log is then queried by 11/07/2015 date. Finally, the results are outputted to filename audit.txt. My program generates an error when executed.