I have a command that is fetching some information from the internet and entering it into a database. To ensure it keeps running, I am running the task on an AWS instance with a screen command. I need to see the various parameters that that command was executed with? How can I see the currently running/last executed command on another screen?
Getting the last executed command on a screen
gnu screen
Two options with job control:you ran the command as screen mycommand -abc -other -args. In this case, use Ctrl ad to detach. Then cursor up or type history | tail. Use screen -r to reattach.you started screen and ran your command in the new session. In this scenario you can (probably) Ctrl z to suspend the process. Then cursor up or type history | tail. Use fg to continue the process as before.