显而易见的解决方案产生的退出代码为 1:
bash$ rm -rf .*
rm: cannot remove directory `.'
rm: cannot remove directory `..'
bash$ echo $?
1
Run Code Online (Sandbox Code Playgroud)
一种可能的解决方案是跳过“。” 和 ".." 目录,但只会删除名称超过 3 个字符的文件:
bash$ rm -f .??*
Run Code Online (Sandbox Code Playgroud) 我想使用像 eth1 这样的真实网络接口名称创建一个 Linux 虚拟网络接口(通常标记为 eth0:0)。
换句话说,我可以让 eth0 和 eth1 有不同的 IP 地址但使用相同的物理网络接口吗?
是否可以?如何?
我有一个遗留应用程序,它需要两个物理网络接口(eth0 和 eth1),我想将其安装在只有一个物理网络接口的平台上。