1

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.

3

1 Answer 1

0

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
3
  • 2
    If 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
    This would also return other commands, e.g. cat.
    – Sparhawk
    Jun 13, 2019 at 10:57
  • 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.