我有一台配备 Intel(R) Pentium(R) CPU G640 @ 2.80 GHz 和 8 GB RAM 的 PC。我正在使用 EXT3 文件系统在其上运行 Scientific Linux 6.5。
在此设置中,我可以sort -u在 200 GB 文件上执行的最快方法是什么?
我应该将文件拆分为较小的文件(小于 8 GB)sort -u,将它们放在一起,然后再次以不同的大小sort -u再次拆分它们,等等?或者是否有任何排序脚本、程序可以用我有限的 RAM 处理这么大的文件?
我发现了一个关于如何删除超过 2048 个字符的行的问题:
问:但是如何删除短于 4 个字符的行?因此,删除文件中长度为 1 或 2 或 3 的行。
更新:感谢许多好的答案,但我只能将一个标记为 OK
我们有一个 Ubuntu 12.04 服务器,在端口 80 上有 httpd,我们想限制:
我们如何用 iptables 做到这一点?
如果我将swappiness值配置为另一个,例如:60 到 0,那么我总是需要重新启动机器才能使更改生效?即使在修改时:
sysctl -w vm.swappiness=0
Run Code Online (Sandbox Code Playgroud) SSHD 配置中有一个 Match 组:
cat /etc/ssh/sshd_config
...
Match Group FOOGROUP
ForceCommand /bin/customshell
...
Run Code Online (Sandbox Code Playgroud)
机器上有许多用户在“FOOGROUP”中。
我的问题:如何从“匹配组”中排除“FOOGROUP”中的给定用户?
有两台机器,SLES 的相同版本/架构。
在机器#A 上安装了一个“foo”软件,我们可以使用rpm -qa.
在机器#B 上需要安装“foo”软件。
在foo.rpm从任何来源无法使用,从互联网等
由于该软件包foo.rpm已安装在机器 #A 上,我们能否foo.rpm从已安装的文件在其上构建文件?
我认为 rpm 中也有前/后脚本。那么foo.rpm(有依赖关系?)就可以安装了。
有一个没有任何iptables防御的服务器:ACCEPT all..
此服务器上可能有自定义应用程序。
如果我们需要用严格的 iptables 规则来强化这个服务器(所以拒绝所有,只让应用程序需要什么),我们必须手工找出哪个应用程序使用哪个dst/src port/protocol,然后我们必须为它编写 iptables 规则他们..
问题:是否有任何脚本可以帮助从正在运行的机器上收集这些信息?(来自日志?) - 并自动生成 iptables 规则?
就像audit2allow在SELinux. 只为iptables!
机器不能有任何中断!
例如:“MAGIC”脚本应该在机器上运行一周/月,收集信息,然后,一周/月后,脚本将能够生成我们可以使用的 iptables 规则文件。
许多人可能会遇到这种情况(如何针对 iptables 强化服务器)。如果有一个脚本/解决方案可以做到这一点,那就太好了:\
使用 nginx/1.4.1 和 OpenBSD 5.4,64 位:

在使用目录列表时,我们如何设置 nginx 以显示完整的文件名(或至少从文件名中显示更多的默认文件名)?
谷歌搜索只给了我这个:
http://forum.nginx.org/read.php?2,124400,167420#msg-167420
January 18, 2011 08:36PM
fagtron
I looked all over the net and wasn't able to find this answer anyway, so I looked into the nginx source files and it's very easy.
Simply modify the file located at [b]src/http/modules/ngx_http_autoindex_module.c[/b] and then compile.
Change these lines:
[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 50
#define NGX_HTTP_AUTOINDEX_NAME_LEN 50[/b]
to whatever you want, such as:
[b]#define NGX_HTTP_AUTOINDEX_PREALLOCATE 100
#define NGX_HTTP_AUTOINDEX_NAME_LEN 100[/b]
And then compile and restart nginx. That's …Run Code Online (Sandbox Code Playgroud) 来自:https : //code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions
CLONING/IMAGING: If you clone or image a LUKS container, you make a copy
of the LUKS header and the master key will stay the same! That means that if
you distribute an image to several machines, the same master key will be used
on all of them, regardless of whether you change the passphrases. Do NOT do this!
If you do, a root-user on any of the machines with a mapped (decrypted) container
or a passphrase …Run Code Online (Sandbox Code Playgroud)