QuestionQ109

Linux Fundamentals

A script named backup.sh must execute on a Linux server to carry out a backup operation. The script must keep running even when the terminal session is closed. Which command accomplishes this?

  • A ./backup.sh
  • B sudo ./backup.sh
  • C ./backup.sh > /dev/null
  • D nohup ./backup.sh &
Explanation

nohup runs a command with hangup signals ignored, allowing it to continue after logout or terminal closure. The trailing & runs the command in the background. GNU Coreutils: nohup invocation

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!