I am not sure whether this was asked before, but I didn't find a reference in GAP system documentation on how to print the history of the command line (Ubuntu installation).


For instance:



```
gap> G := Group((1,2)(3,4),(1,2,3));
> irr := Irr(G);

```

How to save or print the list of my previous commands (similar to **history** command on Ubuntu).


Many thanks.



Get the commands history from GAP system
There are three commands that will do all variations of this:


1. `LogTo("filename.txt")` will save all subsequent **input and output** to a file with the specified name.
2. `InputLogTo("filename.txt")` will save all subsequent **input** to a file with the specified name.
3. `OutputLogTo("filename.txt")` will save all subsequent **output** to a file with the specified name.


In all three cases, running the command with no argument will stop the logging. More details can be found [here in the GAP Manual](https://www.gap-system.org/Manuals/doc/ref/chap9.html#X79813A6686894960).


