Hi I am using nohup command in script(say nohup ls- ltr > somefile 2>&1 & ). I dont want any kind of output to be displayed on screen. When i tried the above nohup it still gives me some out put on screen like
[4] 2991 [3] Done >somefile 2>&1
Please you let me know what is to be done
Thanks in advance Ammu
set +m nohup ...
Thanks for replying. Still it gives me the output on the terminal
You don't see 'done', but you see the first one. This is because your shell is interactive, use a script:
$ cat s #! /bin/bash nohup "$@" > nohup.log 2>&1 & $ ./s sleep 2 $ ps PID TTY TIME CMD 17788 pts/1 0:00 bash 17810 pts/1 0:00 sleep 17793 pts/1 0:00 bash