While using applications (such as a database front end, or a programming language) from within a terminal, what's the best way to store the command history (of commands issued within the applications).

E.g. I start python from the shell and issue a bunch of python commands. I'd like those stored somehow.

I know this is possible because I've done it earlier, but despite my best efforts, am unable to recall it now. It was something of the form >XX APP_NAME where APP_NAME was something like python and XX is the program that was prefixed to the application name to store the application's command history.

To clarify, when I go back in the same application the same way (> XX APP_NAME) pressing the up arrow should give previously issued commands.

2 Answers 2


Ok, found it at long last. It is rlwrap

To copy paste from its man page:

rlwrap runs the specified command, intercepting user input in order to provide readline's line editing, persistent history and completion

  • Awesome! I also used this before and needed it again. But it was very difficult to come up with the right search term. Finally found it!
    – Paul
    Sep 16, 2020 at 9:45

screen > logfile

will make a full session logfile until exit

this keeps ALL

U can alos do script filename

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .