Ubuntu 将某个用户的命令放到后台执行


ps -u username | grep -v "PID" | awk '{print $1}' | xargs -I {} sudo nohup renice -n 19 -p {} &>/dev/null &

举例:

ps -u xu | grep -v "PID" | awk '{print $1}' | xargs -I {} nohup -p {} &>/dev/null &

Author: Yixiang Zhang
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source Yixiang Zhang !
评论
  TOC