属于我的梦,明明还在
个人工具站/博客持续更新中用于技术层面探讨 http://rhx0306.online/
摘要: [root@AY120919111755c246621 tmp]# fdisk -l Disk /dev/xvda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 阅读全文
posted @ 2022-03-11 14:38 属于我的梦,明明还在 阅读(66) 评论(0) 推荐(0)
摘要: 命令: iptables [ -t 表名] 命令选项 [链名] [条件匹配] [-j 处理动作或跳转] ACCEPT: 允许数据包通过。DROP : 直接丢弃数据包,不给任何回应信息,这时候客户端会感觉自己的请求泥牛入海了,过了超时时间才会有反应。REJECT: 拒绝数据包通过,必要时会给数据发送端 阅读全文
posted @ 2022-03-07 18:02 属于我的梦,明明还在 阅读(1675) 评论(0) 推荐(0)
摘要: 1.with...as...第一种是和with结合使用,主要用于文件的读写操作,省去了关闭文件的麻烦。写法: with open("文件路径","读写方式") as 赋值变量: 执行代码块实例: #test.py with open("1.txt") as f: print f.read() #1. 阅读全文
posted @ 2022-03-07 14:41 属于我的梦,明明还在 阅读(52) 评论(0) 推荐(0)
摘要: ConfigParse 模块: 阅读全文
posted @ 2022-03-07 14:34 属于我的梦,明明还在 阅读(43) 评论(0) 推荐(0)
摘要: OS 模块: OS模块:获取当前使用的操作系统 1、os.getcwd()函数 功能:获取当前目录,python 的工作目录 import os pwd = os.getcwd() print (pwd) 2、os.name 函数 功能:获取当前使用的操作系统(获取信息不够详细) 其中 'nt' 是 阅读全文
posted @ 2022-03-07 11:21 属于我的梦,明明还在 阅读(367) 评论(0) 推荐(0)
摘要: 一、 系统优化脚本 #/bin/bash # 设置时区并同步时间 ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime if ! crontab -l |grep ntpdate &>/dev/null ; then (echo "* 1 * 阅读全文
posted @ 2022-03-04 14:22 属于我的梦,明明还在 阅读(58) 评论(0) 推荐(0)
摘要: BOOTPROTO=static 1、none表示使用静态IP,dhcp表示使用动态IP。 2、none的IP地址要自行配置 ,dhcp动态IP地址是自行生成。 3、BOOTPROTO=none 无(不指定)通常是DHCP或static,要自己自行指定IP地址 阅读全文
posted @ 2022-03-04 11:23 属于我的梦,明明还在 阅读(5676) 评论(0) 推荐(0)
摘要: 一、安装requests pip install requests 二、requests库的基础方法如下: F12的使用 阅读全文
posted @ 2022-03-01 14:14 属于我的梦,明明还在 阅读(43) 评论(0) 推荐(0)
摘要: 问题描述: 解决方法: python -m pip install --upgrade pip 更新pip ,后重新下载 结果: 阅读全文
posted @ 2022-03-01 14:11 属于我的梦,明明还在 阅读(652) 评论(0) 推荐(0)
摘要: CentOS7-1810和Ubuntu18.04支持的格式化命令 mkfs mkfs.cramfs mkfs.ext3 mkfs.fat mkfs .msdos mkfs.xfs mkfs.btrfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat 一、 将磁盘格式 阅读全文
posted @ 2022-02-25 17:18 属于我的梦,明明还在 阅读(814) 评论(0) 推荐(0)