I am working on a Raspberry Pi project; it includes NUT server configuration and making the OS Image read-only.

I have completed the required steps and configured the NUT server.

I uninstalled the cron and required a alternate method to launch my application script on start up. after looking up some online resources, I have decided to use the rc.local file to launch my application script.

But when the system reboots I am seeing the my application script is continuously displaying the message generate by the NUT server command. Which used to be not visible when I was using the cron.

The following is the command that is generating a message every time the script is called. (My application script runs in a infinite loop).


upsc myups


Init SSL without certificate database

I have tried dumping the script output to /dev/null but it did not help.


printf "Launching Script \n"

/home/pi/dataLog.sh & > /dev/null  2>&1

I am not sure if this is the right approach.

  • I have my script at /home/pi/ directory. Commented Sep 16, 2019 at 18:14
  • I have tried the method shown in the link, still getting the message Using following - /home/pi/dataLog.sh & > /dev/null 2>&1 Commented Sep 16, 2019 at 18:16
  • @Christopher - I have used the /etc/home/pi/<script> but now I am getting error that file not found. Commented Sep 16, 2019 at 18:19
  • 3
    command > /dev/null 2>&1 & Commented Sep 16, 2019 at 18:31
  • 1
    Why the & before the > /dev/null ?
    – Scottie H
    Commented Sep 16, 2019 at 18:41

1 Answer 1


Thank you, Christopher for the answer. The right method is

/home/pi/script > /dev/null 2>&1 & 
  • 1
    @ Anthony Geoghegan There is 2 day wait time before I can accept my answer Commented Sep 17, 2019 at 14:35
  • 1
    OK, that makes sense. I don't ask many questions here but when I do I'm usually happy to wait a while for the best answer so I wasn't aware of this delay. BTW, I'd suggest that whenever you're writing shell scripts, it's always worth checking them with shellcheck. Commented Sep 18, 2019 at 9:13
  • @AnthonyGeoghegan thank you for the information, I was not aware about this tool. Commented Sep 18, 2019 at 12:16

You must log in to answer this question.

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