shell 获取当前路径 和 2>&1 &的作用

#!/bin/bash
current_path=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
nohup $current_path/clickhouse_sinker -conf $current_path/config >> $current_path/sinker.log 2>&1 &
#这里杀死程序优先使用kill -15(会先释放资源),然后再使用kill -9(强制退出)

 

posted on 2020-09-04 17:55  北溟有鱼。  阅读(342)  评论(0编辑  收藏  举报