我必须在大约200台远程Linux服务器上更新一行。
有人能告诉我如果不可能用ssh吗?
假设我在文本文件中有5行,我想更新第3行中的命令,如下所示:
line 1
line 2
line 3 # I want to update this line
line 4
line 5
使用ssh远程使用什么命令来更新第3行或在其中添加更多文本?
谢谢。
案文如下:
We will now present the Linux ls command
... here description of ls
We will now present the Linux cd command
... here description of cd
... more description
Done
下面的sed替换正则表达式应用于文本。
sed 's/.*Linux \(.*\) .*/\1:/' ex2.txt
,它提供以下输出
ls:
... here description of ls
cd:
...
我在一台旧的台式电脑上安装了4gb的内存,我刚刚安装了4gb的额外内存。Bios检测8gb,windows检测它。但是linux只提供4gb的内存。
名为-a:
Linux appie-imedia-S2185 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64
x86_64 x86_64 GNU/Linux
免费-m:
total used free shared buff/cache available
Mem: 3365 1
环境规划署:
Ubuntu 12.04
Windows 7
我将Android金鱼内核回购的.git目录从Ubuntu复制到git status,结果是:
# On branch android-goldfish-2.6.29
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard change