For long running tasks/scripts you can utilise screen utility to create session, go away and get back to same session and check status. This is ideal toll for example for running long term rsync tasks.
Homepage - https://www.gnu.org/software/screen/
Tips and tricks - https://linuxize.com/post/how-to-use-linux-screen/
CentOS
yum install screen -y |
Ubuntu
apt-get install screen -y |
screen |
And now you can execute your long term running task.
To go away from server and keep task running, you need to detach from screen session using following shortcut:
[Ctrl] + [a]
And then pressing [d].
To see your long term task you need to re-attach to previously created session like this:
screen -r |
After finishing that long term activity, you will terminate session by using following shortcut:
[Ctrl] + [d]