我过去从kernel.org编译了一些内核,但我不确定一些术语:
最近,我有一个通过邮件列表的开发人员告诉我为一个功能安装一个特定的内核,"3.12+(net.git)应该没问题." net.git是什么意思?我去了kernel.org,它说3.12是主线(在我搜索时),但我没有看到net.git.
如果有人说安装3.12(net.git)我该如何获得它?这是否意味着从github上的特定分支克隆?
net.next,linux-next,net.git等术语是什么意思?我想也有其他人.
是否有一个页面可以记录或者可以在Linux内核的上下文中解释这些项目的含义?我有兴趣了解未列出的其他人.
我已阅读https://www.kernel.org/category/faq.html,其中解释了主线和稳定版本.
我过去在 Linux 上通过设置 proc 文件的值来设置 IRQ 关联。[1] 但是,我注意到,当我在使用 MSI-X 的设备 (PCIe) 的系统上执行此操作时,我想为例如 NIC 设置关联性,IRQ 的每个内核的 /proc/interrupt 计数器都会增加,并且不是针对我设置的单核。在非 MSI-X 系统中,指定的内核响应中断。
我正在使用 Linux 内核 3.11。
简短:可以为使用 MSI-X 中断的设备设置 IRQ 关联吗?
[1] https://www.kernel.org/doc/Documentation/IRQ-affinity.txt
在Ubuntu Linux上,使用Bash,我在/ etc/profile上设置了登录时的只读变量.这是我的/ etc/profile(我的添加内容位于此文件的底部):
# Check for interactive bash and that we haven't already been sourced.
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 2 ]; then
if shopt -q progcomp && [ -r /etc/bash_completion ]; then
# Source completion code.
. /etc/bash_completion
fi
fi
unset bash bmajor bminor
# /etc/profile: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用awk来读取文件,并且只显示不以+或 - 4行或更多次开头的行.gawk也没关系.每个分组用空行分隔.
下面是该文件的样本,这些都是我行不希望打印:
+Host is up.
+Not shown: 95 closed ports, 3 filtered ports
+PORT STATE SERVICE VERSION
+23/tcp open telnet
+9100/tcp open jetdirect
-Host is up.
-Not shown: 99 closed ports
-PORT STATE SERVICE VERSION
-5900/tcp open vnc
Run Code Online (Sandbox Code Playgroud)
从该文件的样品,我不(在一行中不4个或更多)要打印:
-Not shown: 76 closed ports, 18 filtered ports
+Not shown: 93 closed ports
PORT STATE SERVICE VERSION
+514/tcp open shell
Run Code Online (Sandbox Code Playgroud)
我正在学习如何使用awk,因为我一直在阅读O'Reilly的awk&sed,但我对这个问题感到有点困惑.此外,如果有人关心,我不介意看到使用shell脚本解决此问题的非awk方法.
谢谢!
当涉及到模块/库以提高可读性时,我喜欢在 python 中使用完整的命名空间。我想知道为什么这在 xml 库中不起作用。我import xml想还将导入 etree 和命名空间中的所有其他内容。至少这是我注意到其他模块的行为。
$ ptpython
>>> import xml
>>> dir(xml.etree.ElementTree)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'etree'
'module' object has no attribute 'etree'
>>> import xml.etree.ElementTree
>>> dir(xml.etree.ElementTree)
['Comment', 'Element', 'ElementPath', 'ElementTree', 'HTML_EMPTY', 'PI',...]
Run Code Online (Sandbox Code Playgroud)
两个问题:
import xml?操作系统:FreeBSD 8.2、bash
大家好,
我很困惑为什么我不能从 df 中 grep 带有 /partition 的行:
/dev/amrd0s1a 1012974 452694 479244 49% /
Run Code Online (Sandbox Code Playgroud)
我希望能够只 grep 该行(其他行也有斜杠),所以我认为其中之一可以工作:
df -m | grep -E '\<'/'\>'
df -m | grep -E '\</\>'
df -m | grep -E '\<"/"\>'
Run Code Online (Sandbox Code Playgroud)
但这些都不起作用,我想这样做,这样我就可以练习使用 '\< \>'。我也尝试过不带-E。
这可以做到吗?我究竟做错了什么?
提前致谢!