How to make the script command append to a file?

The script command typecasts the terminal activity to a particular file. I understood that part, but is there a way it can be made to append to an existing file?

The end goal for me is to make the script append the data to an existing file with a timestamp that is achieved by the date command. And ultimately have a launcher that pre-executes this upon its launch and I have a logfile of every output on my terminal. I think I have the puzzle solved except for making the script command append.


Solution 1:

As the man pages says, the -a option is for append

script -a file

If file is missing, the default typescript filename is used.