小编War*_*ung的帖子

为什么 unlink(1) 只支持一个文件?

如果可能的话,我习惯于支持多个文件名参数的命令,但unlink不:

%> unlink a b
unlink: extra operand `b'
Try `unlink --help' for more information.
Run Code Online (Sandbox Code Playgroud)

我最终使用了一个for循环。为什么unlink只需要一个文件名是否有技术原因?

command-line coreutils

3
推荐指数
1
解决办法
1139
查看次数

我如何通过 CVS 查看 OpenBSD 网站?

我最近在 OpenBSD misc 邮件列表上读到了这个:

"John Darrah" writes:
> Hi. Would it be possible to get SSL on the OpenBSD website(s)?
> It would be just a couple lines to change in nginx.conf/httpd.conf.
> SSL certificates are free from Startcom and cheap from other vendors.
> It would be really nice to have, even if it's not the default. I feel naked
> viewing the site over plain http. Thanks.

If you want encrypted access to the OpenBSD web site, do …
Run Code Online (Sandbox Code Playgroud)

openbsd cvs

3
推荐指数
1
解决办法
619
查看次数

获取包含目录中文件名的 CSV 文件?

我想弄清楚如何导出目录中文件的名称,以保存在可以在 Excel 中编辑的 CSV 文件中。该目录如下所示:

$ ls
Sample_38_41_1_A01  Sample_38_41_1_A11  Sample_38_41_1_B09
Sample_38_41_1_C07  Sample_38_41_1_D05  Sample_38_41_1_E03
Sample_38_41_1_F01
Run Code Online (Sandbox Code Playgroud)

我希望 CSV 文件的每一行都具有在该目录中找到的文件的名称。在 Excel 中它应该是这样的:

A            B    C
1 Sample_38_41_1_A01
2 Sample_38_41_1_A11
3 Sample_38_41_1_B09 
4 Sample_38_41_1_C07 
5 Sample_38_41_1_D05
6 Sample_38_41_1_E03
7 Sample_38_41_1_F01
8 ...
Run Code Online (Sandbox Code Playgroud)

linux text-processing

3
推荐指数
2
解决办法
3万
查看次数

使用“-type d”测试时,为什么会在非目录中查找管道?

我有一个目录

~/root/
|-- bar
|-- eggs
|-- foo
|-- hello.txt
|-- script.sh
`-- spam

4 directories, 2 files
Run Code Online (Sandbox Code Playgroud)

find . -type d~/root/收益中发行

.
./spam
./eggs
./bar
./foo
Run Code Online (Sandbox Code Playgroud)

然而,发行find . -type d | parallel "echo {}" ::: *收益率

bar
eggs
foo
hello.txt
script.sh
spam
Run Code Online (Sandbox Code Playgroud)

为什么非目录hello.txtscript.sh管道在这里?

pipe find gnu-parallel

3
推荐指数
1
解决办法
152
查看次数

如何检测网络连接失败?

我在 Windows 机器和 Linux 机器之间有直接的以太网连接。如果我在 Windows 端禁用连接,Linux 似乎仍然相信链接已启动。

这是正常行为吗?if down如果链接失败以及ifup何时返回,我希望 Linux 能够运行。那可能吗?

networking centos

1
推荐指数
1
解决办法
2225
查看次数