我阅读了 gparted 的这个文档,以便在移动分区时从引导问题中恢复。为了grub在 gparted 终端上测试命令,我想打开终端,但没有从我的 Ubuntu 13.04 中找到方法。当我sudo gparted &在 shell 终端上运行时,它会打开 GUI,因此我无法测试命令。如何打开终端?
我有一个来自 gmail 的大型 mbox 文件备份。它超过 5GB,并且每晚都会通过 cron 作业更新新消息。我希望 cron 作业也检查存档的有效性,以确保它仍然是有效的 mbox 格式。
是否有命令行工具来验证 mbox 文件,或者至少列出最新消息?
(作为参考,代码也可能在这里:https : //github.com/garyexplains/examples ,这可能是比视频更好的来源。)
CentOS 上的这个简单脚本有什么理由不能在 Ubuntu 上运行吗?
[nsaunders@rolly awk]$
[nsaunders@rolly awk]$ awk -f loop.awk numbers.txt
1 2 3
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8 …Run Code Online (Sandbox Code Playgroud) 也许kill是不正确的术语,或者至少我使用不正确。
如何销毁 docker 容器?将它们放入垃圾桶。删除。消除。擦除。
docker container kill $(docker ps -a -q | awk '{print $1}')
Run Code Online (Sandbox Code Playgroud)
不太有效:
Error response from daemon: Cannot kill container: 06e44d24ba8d: Container 06e44d24ba8d3df83e10a1829f04755cb9053faa68ab3dabccd10c3ee1c80322 is not running
Error response from daemon: Cannot kill container: 22539a069e3b: Container 22539a069e3b8bbbd27b062603a7667857ac1a5e64242004fe7b72411a9cdbca is not running
Error response from daemon: Cannot kill container: 1f7cf43ab398: Container 1f7cf43ab398e6e18416f69fc947b49d9792b1932a4b157f0514f9f6638ca185 is not running
Error response from daemon: Cannot kill container: 7fc8c24ccabe: Container 7fc8c24ccabef04215df9ba7b8c171df6b963942e6e90c92a462cc0ab9d5dcb0 is not running
Run Code Online (Sandbox Code Playgroud)
也可以看看:
认识到这基本上是一个常见问题解答:
nicholas@mordor:~$
nicholas@mordor:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nicholas@mordor:~$
nicholas@mordor:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
nicholas@mordor:~$
nicholas@mordor:~$ sudo dpkg --get-selections | grep hold
nicholas@mordor:~$
nicholas@mordor:~$ sudo apt install mariadb-server mariadb-client
Reading package lists... Done
Building dependency tree …Run Code Online (Sandbox Code Playgroud) 到目前为止,这里的一切都有效——关键是,声音回放。
麦克风本身是如何测试的?
nicholas@gondor:~$
nicholas@gondor:~$ sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: STAC9228 Analog [STAC9228 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: STAC9228 Digital [STAC9228 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
nicholas@gondor:~$
nicholas@gondor:~$ aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
nicholas@gondor:~$
nicholas@gondor:~$ pacmd
Welcome to PulseAudio 13.99.2! Use "help" for usage information.
>>> list-sinks
1 …Run Code Online (Sandbox Code Playgroud) 我希望使用以下工具:
与 Docker 一起工作。
列出容器:
docker container ls | awk '{print $1}'
Run Code Online (Sandbox Code Playgroud)
结果:
CONTAINER
490e3d669259
a44230a617e1
Run Code Online (Sandbox Code Playgroud)
我怎样才能省略“标题”?
以下是docker container ls应证明有用的完整输出:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
490e3d669259 jetty "/docker-entrypoint.…" 3 minutes ago Up 3 minutes 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp quirky_antonelli
a44230a617e1 jetty "/docker-entrypoint.…" 4 minutes ago Up 4 minutes 8080/tcp goofy_hamilton
Run Code Online (Sandbox Code Playgroud)
我只是在寻找容器标题下的值。
跑步flatpak list节目:
Visual Studio Code com.visualstudio.code 1.55.1-1617807524 stable system
Run Code Online (Sandbox Code Playgroud)
但该应用程序是如何启动的呢?
(我发现的搜索结果是关于如何安装应用程序,而不是启动或运行特定应用程序。)
package-management command-line ide software-installation flatpak
我如何简单地拉动并运行hello-world?
nicholas@mordor:~$ \nnicholas@mordor:~$ \nnicholas@mordor:~$ snap list docker\nName Version Rev Tracking Publisher Notes\ndocker 20.10.14 1779 latest/stable canonical\xe2\x9c\x93 -\nnicholas@mordor:~$ \nnicholas@mordor:~$ sudo docker pull hello-world\nUsing default tag: latest\nCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\nnicholas@mordor:~$ \nnicholas@mordor:~$ lsb_release -a\nNo LSB modules are available.\nDistributor ID: Ubuntu\nDescription: Ubuntu 22.04 LTS\nRelease: 22.04\nCodename: jammy\nnicholas@mordor:~$ \nnicholas@mordor:~$ sudo systemctl start docker\nFailed to start docker.service: Unit docker.service not found.\nnicholas@mordor:~$ \nnicholas@mordor:~$ sudo systemctl status docker\nUnit docker.service could not be found.\nnicholas@mordor:~$ \nRun Code Online (Sandbox Code Playgroud)\n也可以看看:
\n …