安装虚拟机2个 minimal模式 英文 主机名自己定义 第一个以下简称node1 第二个以下简称node2
看个例子吧:
#!/bin/sh cd ~ mkdir shell_tut cd shell_tut for ((i=0; i<10; i++)); do touch test_$i.txt done
mkdir, touch都是系统自带的程序,一般在/bin或者/usr/bin目录下。for, do, done是sh脚本语言的关键字。
shell是指一种应用程序,这个应用程序提供了一个界面,用户通过这个界面访问操作系统内核的服务。Ken Thompson的sh是第一种Unix Shell,Windows Explorer是一个典型的图形界面Shell。
shell脚本(shell script),是一种为shell编写的脚本程序。业界所说的shell通常都是指shell脚本,但读者朋友要知道,shell和shell script是两个不同的概念。由于习惯的原因,简洁起见,本文出现的“shell编程”都是指shell脚本编程,不是指开发shell自身(如Windows Explorer扩展开发)。
bashgyc@GYC:~$ ping www.baidu.com PING www.baidu.com (198.18.0.84) 56(84) bytes of data. 64 bytes from 198.18.0.84 (198.18.0.84): icmp_seq=1 ttl=63 time=0.894 ms 64 bytes from 198.18.0.84 (198.18.0.84): icmp_seq=2 ttl=63 time=0.203 ms 64 bytes from 198.18.0.84 (198.18.0.84): icmp_seq=3 ttl=63 time=0.199 ms 64 bytes from 198.18.0.84 (198.18.0.84): icmp_seq=4 ttl=63 time=0.199 ms 64 bytes from 198.18.0.84 (198.18.0.84): icmp_seq=5 ttl=63 time=0.161 ms ^C64 bytes from 198.18.0.84: icmp_seq=6 ttl=63 time=0.205 ms --- www.baidu.com ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 6131ms rtt min/avg/max/mdev = 0.161/0.310/0.894/0.261 ms
www.baidu.com 域名IP地址为 198.18.0.84
rsync
和 rm
在大量文件删除中的效率在处理大量文件的删除操作时,经常面临性能挑战。尽管 rm
命令在 Linux 系统中非常常见,但 rsync
也可以在特定情况下提供更高效的删除操作。
bashIPADDR="192.168.12.128"
NETMASK="255.255.255.0"
GATEWAY="192.168.12.1"
powershell以太网适配器 VMware Network Adapter VMnet8: 连接特定的 DNS 后缀 . . . . . . . : 本地链接 IPv6 地址. . . . . . . . : fe80::dd0a:4db6:b2f:870f%6 IPv4 地址 . . . . . . . . . . . . : 192.168.12.1 子网掩码 . . . . . . . . . . . . : 255.255.12.0 默认网关. . . . . . . . . . . . . :