Getting sudo and nohup to work together

后端 未结 9 1636
滥情空心
滥情空心 2021-02-02 06:39

Linux newbie here.

I have a perl script which takes two command line inputs. I tried to run it in the background but this is what I got:

[~user]$ nohup s         


        
9条回答
  •  孤独总比滥情好
    2021-02-02 07:20

    The solution is to use the -b flag for sudo to run the command in the background:

    $ sudo -b ./ascii_loader_script.pl 20070502 ctm_20070502.csv
    

    You should only use nohup if you want the program to continue even after you close your current terminal session

提交回复
热议问题