MongoDB Shell在后台运行执行命令

在MongoDB Shell中执行命令的时候放到后台跑,方法其实很简单,将要运行的命令存为一个js文件,然后执行类似这样的命令:
nohup mongo host/database -u username -p password run.js &