随笔分类 - linux运维总结
摘要:[12:38:09 root@centos8 ~]#bash sort.shbefore sort:14756 26459 13397 30603 24422 17590 16022 5566 10825 20888 1210 220 9242 11466 6855 7255 9758 5254 2
阅读全文
摘要:[11:04:11 root@centos8 ~]#./arr.shAll numbers are 2527 14178 12156 9055 23564 13074 302 13216 21235 20627MAX is 23564MIN is 2527[11:04:17 root@centos8
阅读全文
摘要:expect脚本: [10:40:45 root@centos8 ~]#cat expect{1..3}#!/usr/bin/expectspawn ssh 10.0.0.151expect { "yes/no" { send "yes\n";exp_continue } "password" {
阅读全文
摘要:1、TCP面向连接,UDP无连接;2、TCP占用系统资源较多,UDP少;3、TCP结构复杂,UDP绞简单;4、TCP基于流模式,UDP时数据报模式;5、TCP保证数据正确性,UDP可能丢包;6、TCP保证数据顺序,UDP不保证。
阅读全文
摘要:我们要知道网络传输是有延迟的,可能丢失的,不是说A发一个包给B,B保证能立刻收到,甚至B可能一直收不到。三次握手: 第一次。A跟B说,我要建立连接了。 第二次。B跟A说,OK,那我也建立连接。 第三次。A跟B说,嗯,我知道了。第二次和第三次都是为了保证连接是可靠的。四次挥手: 第一次
阅读全文
摘要:1、物理层:实际的最终信号的传输是通过物理层实现的。通过物理介质传输0-1 比特流。常用的设备有(各种物理设备)集线器、中继器、调制解调器、网线、双绞线、同轴电缆。这些都是物理层的传输介质。 传输的单位是比特。2、数据链路层:将比特组合成字节,再将字节组合成帧,使用数据链路层地址 (以太网使用的是
阅读全文
摘要:apt命令语法: apt options [package ...] options:可选,选项包括 -h(帮助),-y(当安装过程提示选择全部为"yes"),-q(不显示安装的过程)等等。 command:要进行的操作。 package:安装的包名。 apt 常用命令 列出所有可更新的软件清单命令
阅读全文
摘要:[16:49:31 root@centos8 ~]#ls /etc/fstab |sed -r 's#^(/.*/)(.*)#path: \1 \nbasename: \2#'path: /etc/basename: fstab
阅读全文
摘要:[16:36:16 root@centos8 ~]#cat -A /etc/fstab$#$# /etc/fstab$# Created by anaconda on Mon Jul 19 12:39:26 2021$#$# Accessible filesystems, by reference,
阅读全文
摘要:[16:27:28 root@centos8 ~]#ifconfig eth0 |sed -En "/inet/s#[^0-9]+([0-9.]+).*#\1#p"|cat -A10.0.0.150$
阅读全文
摘要:#1 安装相关包[15:51:32 root@centos8 ~]#dnf install gcc make autoconf apr-devel apr-util-devel pcre-devel openssl-devel redhat-rpm-config -y#2 下载并解压包[15:53
阅读全文
摘要:网络yum源配置文件: [14:42:19 root@centos8 cd]#cat /etc/yum.repos.d/base.repo[BaseOS]name=BaseOSbaseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$
阅读全文
摘要:[10:03:38 root@centos8 ~]#cat systeminfo.sh#!/bin/bash# # Copyright (C) 2021 IEucd Inc. All rights reserved.## 文件名称:systeminfo.sh# 创 建 者:TanLiang# 创建
阅读全文
摘要:[09:28:03 root@centos8 ~]#cat disk.sh#!/bin/bash# # Copyright (C) 2021 IEucd Inc. All rights reserved.## 文件名称:disk.sh# 创 建 者:TanLiang# 创建日期:2021年09月2
阅读全文
摘要:[09:15:09 root@centos8 ~]#w -h |tr -s " " |cut -d" " -f3|uniq -c |sort -nr 3 10.0.0.1 1 -
阅读全文
摘要:[09:08:01 root@centos8 ~]#cat /etc/passwd |cut -d: -f1,3,7|sort -t: -k2 -n |tail -n1nobody:65534:/sbin/nologin
阅读全文
摘要:[09:03:59 root@centos8 ~]#echo -e "一共`grep -v "/sbin/nologin" /etc/passwd |awk -F: '{ print $1 }'|wc -l`个,它们分别是:\n`grep -v "/sbin/nologin" /etc/passwd
阅读全文
摘要:useradd 命令创建新的Linux用户 格式:useradd [options] LOGIN 常见选项: -u 指定用户的UID -o 配合-u 选项,不检查UID的唯一性 -g GID 指明用户所属基本组,可为组名,也可以GID -c "COMMENT“ 用户的注释信息 -d HOME_DIR
阅读全文
摘要:
阅读全文
摘要:
阅读全文