kam*_*mil 24 command-line process libreoffice
我正在使用 Ubuntu 12.04.4 LTS 64 位。我的 LibreOffice 套件(尤其是 Writer)冻结了。
我怎样才能杀死 LibreOffice,我可以只杀死作者吗?(不是 Calc,Impress,..)
我试图在系统监视器和命令行 ( ps) 中搜索可执行进程,但没有找到。
编辑:我想要这样的东西:
pkill -9 writer
Run Code Online (Sandbox Code Playgroud)
我需要某种缩小的命令。
May*_*hux 40
首先搜索打开的 libreoffice 文件:
ps aux | grep libre
Run Code Online (Sandbox Code Playgroud)
例如我的输出是:
hadi 21426 0.1 0.0 205328 3468 ? Sl 14:17 0:00 /usr/lib/libreoffice/program/oosplash --writer
hadi 21445 9.8 0.7 1269272 179872 ? Sl 14:17 0:01 /usr/lib/libreoffice/program/soffice.bin --writer --splash-pipe=6
Run Code Online (Sandbox Code Playgroud)
然后
sudo kill -9 ID
Run Code Online (Sandbox Code Playgroud)
ID 是 (soffice.bin) 的第二个数字,而不是 oosplash
所以在我的例子中:
sudo kill -9 21445
Run Code Online (Sandbox Code Playgroud)
你需要专业的 好的:
ps aux | grep -i office | awk {'print $2'} | xargs kill -9
Run Code Online (Sandbox Code Playgroud)
希望这对您的评价是专业的!!
以上的精缩命令
kill -9 `pgrep -lf soffice.bin | awk {'print $1'}`
Run Code Online (Sandbox Code Playgroud)
或更多缩小的缩小的缩小命令
pkill soffice.bin
Run Code Online (Sandbox Code Playgroud)
编辑:
所有 libreoffice 打开的文件都采用相同的 PID,因为例如,您不能只是杀死 writer 并保持impess。
为了证明我的观点,Office 中的恢复工具对于所有文件都是独一无二的。我的意思是,如果您以不正当的方式关闭作家,然后打开一个印象,例如,那么印象将要求您恢复作家文件,它确实这样做了,这证明了我的回答