Skip to content

A script to run stuff in the background and collect output to log file, even if you disconnect from the server

Notifications You must be signed in to change notification settings

gudmojo/background-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

background-script

A bash script to run stuff in the background, even if you disconnect from the server. Useful when ssh remoting into servers and executing long running commands

Usage:

  1. apt install moreutils
  2. Modify job.sh to run any long-running commands you wish to execute
  3. ./run.sh
  4. View the output in job.log

Advantages:

  • The entire log of the output is saved to a log file, adding timestamps in front of each line.

Alternatives:

  • nohup
  • byobu
  • tmux
  • screen
  • disown (this script uses disown behind the scenes)

About

A script to run stuff in the background and collect output to log file, even if you disconnect from the server

Topics

Resources

Stars

Watchers

Forks

Languages