我正在编写一个 bash 脚本,我想回显一个字符串,但没有自动添加到末尾的换行符。阅读手册页,它说标志是-n.
问题是,当我这样做时:
echo -n "My string is here"
Run Code Online (Sandbox Code Playgroud)
bash 脚本中的输出是:
-n My string is here
Run Code Online (Sandbox Code Playgroud)
知道为什么-n输出标志而不是处理标志。
我正在寻找 SAN 解决方案,但买不起入门级解决方案。基本上,SAN 用于开发和概念验证产品。性能不一定要惊人,但需要实用。
我的朋友说我们应该在 Linux 中设置软件 RAID 和软件 iSCSI。基本上,我有一台配备双 Xeon 处理器、4GB 内存和 (2) 个 500GB 7200RPM 驱动器的备用服务器。它有点旧但可以工作。
我确信人们不使用软件 RAID 和 iSCSI 是有原因的,但性能是否可用?考虑在 RAID 0 中配置驱动器(为了性能)。
hardware raid network-attached-storage storage-area-network software-raid
在 linux 中切换用户有什么区别:
su root
Run Code Online (Sandbox Code Playgroud)
和
su -
Run Code Online (Sandbox Code Playgroud) 我想下载一个大文件是.tar.gz和(> 2GB)的大小。bash 脚本还做了很多其他的事情,所以我想开始下载,然后继续处理 bash 脚本中的其他命令。我正在使用wget并通过管道tar在后台运行它&。
wget -q "https://download-of-large-file-here.tar.gz" | tar xz &
# other commands here
Run Code Online (Sandbox Code Playgroud)
然而,这打破了:
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Run Code Online (Sandbox Code Playgroud)
知道如何进行这项工作吗?
有没有办法将以下内容组合成一个漂亮的“单衬”:
echo "free -m" > /tmp/dC4v2cK
bash /tmp/dC4v2cK
Run Code Online (Sandbox Code Playgroud) 如果 ESPNespn.go.com不控制 .tld 的 tld,他们如何控制域go.com。这怎么可能?