CIS241

System-Level Programming and Utilities

History

Erik Fredericks, frederer@gvsu.edu
Fall 2025

Based on material provided by Erin Carrier, Austin Ferguson, and Katherine Bowers

CIS241 | Fredericks | F25 | 7-history

How do you remember what you did?

top-corner (i know what you did)

CIS241 | Fredericks | F25 | 7-history

How do you remember what you did?

Method #1 - manually record with a script

Usage:

  • script <optional filename>
  • Records inputs and outputs, can be viewed later
  • Use exit to stop recording

A question!

  • When would this be useful?
CIS241 | Fredericks | F25 | 7-history

How do you remember what you did?

top-corner (i know what you did 2)

CIS241 | Fredericks | F25 | 7-history

How do you remember what you did?

Method #2 - look at your command history

  • Maybe scroll up if you have an interactive terminal
  • Or use the up/down arrow keys to show recent commands
  • Or better yet, use the history command
    • Usage: history <optional number of lines>
    • Better usage: history | grep <what you want to find>
CIS241 | Fredericks | F25 | 7-history

perhaps, something you wanted to do more than once?