0

What is the best approach to hide a backgrounded processes output from the command line screen? I have the below script that backgrounds start.jar which is a web server. Any ideas?

Unix Shell Script:

cd examples/appserver java -jar start.jar & 

1 Answer 1

2

This is exactly what /dev/null, the output sink, is for.

java -jar start.jar > /dev/null & 
Sign up to request clarification or add additional context in comments.

3 Comments

don't forget java -jar start.jar > /dev/null 2>&1 & to dump standard error too
jwodder's solution still let the startup of the web server output come to the console. When I added evil otto's it blocks it all, thanks!
shortcut for @evilotto's solution is java -jar start.jar &>/dev/null &

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.