我阅读了apt在Softpedia 中添加到1.0的新花式进度条以及如何在此处启用它。但是在运行时sudo apt-get update,我没有看到花哨的进度条。再次阅读第二个链接时,该解决方案明确要求您使用sudo apt update.
因此,我的问题是之间的差异apt和apt-get。我以为他们是一回事。
如果我使用apt-get install -qq mono-devel,我希望它是安静的,除了错误,根据帮助:
-qq No output except for errors
Run Code Online (Sandbox Code Playgroud)
相反,我得到:
Extracting templates from packages: 100%
Selecting previously unselected package binfmt-support.
(Reading database ... 84711 files and directories currently installed.)
Unpacking binfmt-support (from .../binfmt-support_2.0.8_i386.deb) ...
Selecting previously unselected package cli-common.
Unpacking cli-common (from .../cli-common_0.8.2_all.deb) ...
Selecting previously unselected package libgdiplus.
Unpacking libgdiplus (from .../libgdiplus_2.10-3_i386.deb) ...
Selecting previously unselected package libmono-2.0-1.
Unpacking libmono-2.0-1 (from .../libmono-2.0-1_2.10.8.1-1ubuntu2.2_i386.deb) ...
Selecting previously unselected package libmono-2.0-dev.
Unpacking libmono-2.0-dev (from .../libmono-2.0-dev_2.10.8.1-1ubuntu2.2_i386.deb) ...
Selecting previously unselected …Run Code Online (Sandbox Code Playgroud) 当sudo apt-get install -y blender重定向到 时/dev/null,安装过程完成,没有任何警告或错误。
但是当sudo apt install -y blender重定向到时/dev/null,会显示此警告:
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Run Code Online (Sandbox Code Playgroud)
那么导致此警告的命令apt-get和apt命令之间有什么区别?
我知道最好使用apt而不是apt-get,但是如何在apt没有此警告的情况下重定向输出?
有没有另一种方法可以使 apt 不那么嘈杂?(因为-q和-qq选项并非应有的默默无闻)