我想弄清楚哪个用户正在使用给定的服务。systemctl status似乎没有提供该信息
sudo systemctl status nginx.service\nsudo systemctl status emperor.uwsgi.service\n\xe2\x97\x8f emperor.uwsgi.service - uWSGI Emperor\n Loaded: loaded (/etc/systemd/system/emperor.uwsgi.service; disabled; vendor preset: disabled)\n Active: failed (Result: start-limit) since Tue 2020-03-31 11:26:34 UTC; 7min ago\n Process: 31133 ExecStart=/usr/local/bin/pipenv run uwsgi --ini uwsgi.ini (code=exited, status=1/FAILURE)\n Main PID: 31133 (code=exited, status=1/FAILURE)\n\nMar 31 11:26:34 ip-10-28-34-70.eu-west-1.compute.internal systemd[1]: emperor.uwsgi.service: main process exited, code=exited, status=1/FAILURE\nMar 31 11:26:34 ip-10-28-34-70.eu-west-1.compute.internal systemd[1]: Failed to start uWSGI Emperor.\nRun Code Online (Sandbox Code Playgroud)\n\n有什么方法可以从中获取此信息systemctl或者我需要打开单元文件吗?
如果你xterm从命令行开始,给它一个带有-T选项的标题
xterm -T "my window title"
Run Code Online (Sandbox Code Playgroud)
窗口标题可能会通过 shell 提示、其他程序的输出等的转义序列被覆盖。有什么方法可以防止初始标题被覆盖?
在bash它可能做的
my_function() {
echo "hello" |
#remove 'l'
tr -d 'l'
}
Run Code Online (Sandbox Code Playgroud)
但在fish(http://fishshell.com)我无法做到同样的事情:
function my_function
echo "hello" | \
# remove 'l'
tr -d 'l'
end
Run Code Online (Sandbox Code Playgroud)
我也尝试过在评论末尾使用反斜杠,但没有成功。
我倾向于在 中经常使用这个习惯用法bash,通过管道传输多个命令并将每个命令分成自己的行,并为每个命令添加注释。
有什么方法可以实现类似的目标fish吗?