每当我在 ELF 二进制文件上运行文件时,我都会得到以下输出:
[jonescb@localhost ~]$ file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9,
not stripped
Run Code Online (Sandbox Code Playgroud)
我只是想知道在 Linux 2.6.9 中有什么变化,这个二进制文件不能在 2.6.8 上运行?Linux 2.0 中没有添加 ELF 支持吗?
我想使用sed或perl替换前面没有某个词的所有出现的词。
例如,我有一个包含电影情节的文本文件,我想用他们的名字替换所有出现的角色姓氏,但前提是他们的名字不紧跟在他们的姓氏之前。
示例文本可能如下所示:
John Smith and Jane Johnson talk about Smith's car.
Run Code Online (Sandbox Code Playgroud)
我希望它看起来像这样:
John Smith and Jane Johnson talk about John's car.
Run Code Online (Sandbox Code Playgroud)
如果我只是这样做sed 's/Smith/John/' file,那么我会:
John John and Jane Johnson talk about John's car.
Run Code Online (Sandbox Code Playgroud)
姓氏之前的名字将始终相同。我不必处理John Smith和Frank Smith。我只需要一种方法来匹配Smith它John前面没有的。
为文档进行自动换行的最佳方法是什么vim?
我希望每行换行 80 个字符,不仅仅是视觉换行,而是输入换行符。
我通过使用得到了这种工作
:set wrap
:set linebreak
Run Code Online (Sandbox Code Playgroud)
但是如果我返回并在前一行插入文本,它不会调整段落的其余部分。它获取溢出文本并将其放在换行符上,但后面的行不会向上移动以填补空白。
因此,如果我编辑前一行,我的段落可能如下所示
A line that is 80 characters long
short line
A line that is 80 characters lone
Run Code Online (Sandbox Code Playgroud)
我希望它是这样的:
A line that is 80 characters long
short line A line that is 80
characters long
Run Code Online (Sandbox Code Playgroud) 即使我将http://facebook.com放入浏览器,我也希望我的系统自动将我带到https://facebook.com。我可以重定向到不同的域,但如果我放入它,它似乎会忽略它。/etc/hostshttps://
这是有效的,它将 facebook.com 重定向到 google.com:
74.125.95.103 facebook.com
Run Code Online (Sandbox Code Playgroud)
这不
https://74.125.95.103 facebook.com
Run Code Online (Sandbox Code Playgroud)
我的猜测是在 IP 所在的部分根本不能使用文本,但是如何强制它使用 https?这可能iptables吗?
documents ×1
elf ×1
executable ×1
hosts ×1
iptables ×1
linux ×1
networking ×1
perl ×1
sed ×1
vim ×1