我在虚拟机上使用 Debian 9 映像。没有安装 ping 命令。当我运行时:
sudo apt-get install ping
Run Code Online (Sandbox Code Playgroud)
它问我:
Package ping is a virtual package provided by:
iputils-ping 3:20161105-1
inetutils-ping 2:1.9.4-2+b1
You should explicitly select one to install.
Run Code Online (Sandbox Code Playgroud)
为什么有两个 ping 实用程序?它们之间有什么区别?是否有一些指南可以选择一个版本而不是另一个版本?这个选择有什么影响?所有脚本和程序都与这两个版本兼容吗?
在我的机器上(Debian 测试),当我这样做时
ps aux | grep pam
Run Code Online (Sandbox Code Playgroud)
我得到
orto 609 0.0 0.0 58532 2148 ? S 08:06 0:00 (sd-pam)
orto 5533 0.0 0.0 12724 1948 pts/1 S+ 16:51 0:00 grep pam
Run Code Online (Sandbox Code Playgroud)
(sd-pam)对进程来说似乎是一个奇怪的名字。阅读这个论坛,我看到这个名字是由 systemd 故意设置的。在源代码中我们看到
/* The child's job is to reset the PAM session on
* termination */
/* This string must fit in 10 chars (i.e. the length
* of "/sbin/init"), to look pretty in /bin/ps */
rename_process("(sd-pam)");
Run Code Online (Sandbox Code Playgroud)
看起来很漂亮是什么意思/bin/ps,为什么要选择(sd-pam) …
在 htop 或其他显示进程状态的命令中,所有 bash 进程都在命令列中
/bin/bash
Run Code Online (Sandbox Code Playgroud)
但是一个进程在命令列中
-bash
Run Code Online (Sandbox Code Playgroud)
这是什么意思?
阅读debian openjdk-8 源码包的更新日志,我们看到有一个版本叫openjdk-8 (8u45-b14-4),下一个是openjdk-8 (8u60~b22-1)。
最后一个版本中的波浪号是什么意思?
我刚刚安装了 ArchLinux 和 LXDE,一切正常,但字体渲染不是最佳的。阅读有关字体配置的wiki并使用外部信息源,我构建了以下/etc/fonts/fonts.conf文件
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
<edit mode="assign" name="hintstyle">
<const>hintfull</const>
</edit>
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我正在运行 Debian Jessie。我已经升级了系统:
sudo apt-get update
sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)
然后我尝试使用以下内容更新 flash-plugin:
sudo update-flashplugin-nonfree --install
Run Code Online (Sandbox Code Playgroud)
但是该命令在没有输出的情况下运行并且插件没有更新。
sudo update-flashplugin-nonfree --status
Run Code Online (Sandbox Code Playgroud)
给出:
Flash Player version installed on this system : 11.2.202.577
Flash Player version available on upstream site: 11.2.202.616
flash-mozilla.so - auto mode
link currently points to /usr/lib/flashplugin-nonfree/libflashplayer.so
/usr/lib/flashplugin-nonfree/libflashplayer.so - priority 50
Current 'best' version is '/usr/lib/flashplugin-nonfree/libflashplayer.so'.
Run Code Online (Sandbox Code Playgroud)
如果我重新安装flashplugin-nonfree:
sudo apt-get install --reinstall flashplugin-nonfree
Run Code Online (Sandbox Code Playgroud)
出现同样的问题。
问题是什么?
== 编辑(2016 年 6 月 7 日)==
这是一个反复出现的问题,运行:
sudo update-flashplugin-nonfree --install
sudo update-flashplugin-nonfree --status
Run Code Online (Sandbox Code Playgroud)
给
Flash …Run Code Online (Sandbox Code Playgroud) 会话开始后,GNOME 希望您从可用工作区之一中进行选择,即使只有一个工作区。
我宁愿完全禁用此选项,或者可能自动“选择”第一个选项。我的意思是,即使只是点击一下,对我来说也没用,而且很烦人。
这可以做到吗?这个“功能”叫什么?我找不到任何与调整或设置相关的选项(也许是 dconf?)。
我知道./systemd-219/src/core/mount-setup.c 定义了一些 cgroup mount path 。
但我不知道为什么 systemd 创建目录 /sys/fs/cgroup/systemd/ 以及 /sys/fs/cgroup/systemd/ 和 /sys/fs/cgroup/memory/ 之间有什么区别?
/sys/fs/cgroup/systemd/ 挂载路径只是表示默认的 cgroup 路径吗?
#ll /sys/fs/cgroup/systemd/
total 0
-rw-r--r-- 1 root root 0 Jul 6 2017 cgroup.clone_children
--w--w--w- 1 root root 0 Jul 6 2017 cgroup.event_control
-rw-r--r-- 1 root root 0 Jul 6 15:24 cgroup.procs
-r--r--r-- 1 root root 0 Jul 6 2017 cgroup.sane_behavior
drwxr-xr-x 3 root root 0 Jul 6 15:23 docker.slice
-rw-r--r-- 1 root root 0 Jul 6 2017 notify_on_release
-rw-r--r-- 1 …Run Code Online (Sandbox Code Playgroud) 在docker文档的编写 Dockerfiles 指南的最佳实践中,我们可以阅读:
避免安装或使用 sudo,因为它具有不可预测的 TTY 和信号转发行为,可能会导致问题。如果您绝对需要类似于 sudo 的功能,例如以 root 身份初始化守护程序但以非 root 身份运行它),请考虑使用“gosu”。
我的问题是:
sudo行为中究竟有什么是不可预测的?sudo?我想用 etckeeper 进行干净的提交。这是发生的事情:
1)检查存储库的状态:
git status
On branch master
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)
2)修改配置文件:
vi myfile.conf
Run Code Online (Sandbox Code Playgroud)
3) 将其添加到索引中
git add myfile.conf
Run Code Online (Sandbox Code Playgroud)
4)提交
git commit -m"Add this ... to myfile.conf"
Run Code Online (Sandbox Code Playgroud)
5)观察提交:
git log -p -1
[...]
maybe chmod 0644 'magic.mime'
-maybe chmod 0644 'mail.rc'
maybe chmod 0644 'mailcap'
maybe chmod 0644 'mailcap.order'
maybe chmod 0644 'mailname'
+maybe chmod 0644 'mail.rc'
maybe chmod 0644 'manpath.config'
maybe chmod 0644 'matplotlibrc'
maybe chmod 0755 'maven'
[...]
(My modification to myfile.conf)
[...]
Run Code Online (Sandbox Code Playgroud)
我知道即使我不理解这种重新排序的目的,etckeeper …
在Debian Stretch 中,当我尝试通过安装 python 包 python-constraint
pip install python-constraint
Run Code Online (Sandbox Code Playgroud)
我收到以下错误;
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 292, in find_requirement
elif is_prerelease(version) and not (self.allow_all_prereleases or req.prereleases):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 739, in is_prerelease
return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x …Run Code Online (Sandbox Code Playgroud) 在 Debian Stretch 发行版上,如果我运行uname -a,我将获得:
Linux index 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
如果我运行dpkg -s linux-image-amd64 | grep Version,我会得到:
Version: 4.9+80+deb9u6
Run Code Online (Sandbox Code Playgroud)
上面的命令打印了三个不同的内核版本:
我的问题是:这些不同的版本是什么,它们的含义是什么?
如何递归复制所有不超过 1 天的文件?
我第一次尝试
find . -amin -1440 | xargs cp /dest
Run Code Online (Sandbox Code Playgroud)
但它不起作用,因为给予的项目xargs应该在/dest参数之前定位。