I think the title says it. I would like to retrieve the history of commands run a few days ago with at to double check some error we got on an import process.
1 Answer
You can use the history
command to list the previously ran commands.
But since you want the commands containing at
, you can search from within the output of what history will provide to you.
command to retrieve all history
$ history
commands in history containing at
$ history | grep at
-
2If the
at
command was executed from a script, it would not be in the shell's history file. The cron logfile should still mention it though.– Kusalananda ♦Jun 13, 2019 at 10:18 -
2
-
thanks for your answer, on history i can only find this, but I do not know what was scheduled when entered at : 919 atq 918 at 18:00 917 atq 916 at 18:00 Jun 13, 2019 at 11:08
sudo
involved? I'm asking because ofauth.log
.