小编jad*_*ete的帖子

更新命令未找到不工作

所以我正在运行 Debian 测试,我安装了这个command-not-found包,因为我只是喜欢 Ubuntu 中的这个功能。所以我安装了它,当我重新启动我的终端时,它说我需要更新可用包的缓存。所以我做了。我尝试了以下命令:

sudo update-command-not-found
sudo /usr/sbin/command-not-found
su and update-command-not-found
su and /usr/sbin/update-command-not-found
Run Code Online (Sandbox Code Playgroud)

但它只是退出,什么也不做。没有输出。根本不值一提。我试了一下,它说我需要再次更新缓存。

debian command-not-found

12
推荐指数
1
解决办法
5566
查看次数

为什么 grep 在这个命令中不起作用?

我在 Wine 中运行 GTA San Andreas,尽管当我退出游戏时它挂在终端中,并且该进程仍有剩余资源,这导致它无法退出。所以我做了这个命令,我认为它会遍历游戏输出中的行并在找到剩余资源时杀死它:

bash -c 'cd /opt/GTA/San-Andreas && wine ./gta_sa.exe | while read line; do if [[ $(echo $line | grep -i "leftover resource") ]]; then killall gta_sa.exe; exit; fi; done'
Run Code Online (Sandbox Code Playgroud)

我在 gta_sa.exe 挂起之前得到了这个输出:

fixme:d3d:wined3d_device_uninit_3d Something's still holding the implicit swapchain.
fixme:d3d:wined3d_device_decref Device released with resources still bound, acceptable but unexpected.
fixme:d3d:wined3d_device_decref Leftover resource 0x539a5e8 with type WINED3D_RTYPE_TEXTURE_2D (0x2).
fixme:d3d:wined3d_device_decref Leftover resource 0x1b8ea8 with type WINED3D_RTYPE_TEXTURE_2D (0x2).
fixme:d3d:wined3d_device_decref Leftover resource 0x1b8cb0 with type WINED3D_RTYPE_TEXTURE_2D (0x2).
fixme:d3d:wined3d_device_decref Leftover …
Run Code Online (Sandbox Code Playgroud)

grep bash wine

5
推荐指数
1
解决办法
988
查看次数

标签 统计

bash ×1

command-not-found ×1

debian ×1

grep ×1

wine ×1