随笔分类 -  实战派日记

摘要:第二十一天 家目录特殊文件 history命令讲解 [root@master ~]# ls 1.txt anaconda-ks.cfg CentOS6-Base-163.repo hosts motd nwq1.6.sh profile test.txt [root@master ~]# ls -a 阅读全文
posted @ 2024-03-18 22:43 三思博客 阅读(20) 评论(0) 推荐(0) 编辑
摘要:第二十一天--学习笔记 家目录特殊文件 history命令讲解 [root@master ~]# ls 1.txt anaconda-ks.cfg CentOS6-Base-163.repo hosts motd nwq1.6.sh profile test.txt [root@master ~]# 阅读全文
posted @ 2024-03-18 22:43 三思博客 阅读(20) 评论(0) 推荐(0) 编辑
摘要:四剑客面试真题-3 1、创建目录 /data/it , 并且在该目录下创建目录文件 it.txt , 然后在文件 it.txt 里写入内容 inet addr:10.0.0.8 Bcast:10.0.0.25 Mask:255.255.255.255 mkdir -p /data/it echo " 阅读全文
posted @ 2024-03-16 23:02 三思博客 阅读(6) 评论(0) 推荐(0) 编辑
摘要:四剑客面试真题-2 1.截取本机IP,并用IP:192.168.5.101 的格式显示 使用ifconfig命令查看并截取 ip:192.168.5.101 ifconfig ifconfig ens33 |grep -oE 'inet (addr:)?([0-9\.]+)' |grep -Eo ' 阅读全文
posted @ 2024-03-16 23:02 三思博客 阅读(8) 评论(0) 推荐(0) 编辑
摘要:四剑客面试真题-1 1、linux系统中,什么命令可以从文本文件的每一行中截取指定的内容的数据 用awk awk可以截取 awk '{print $1}' test.txt 实际效果演示 [root@master ~]# cat test.txt dsjkfh fsdfhsd sdfjs sdkfh 阅读全文
posted @ 2024-03-16 23:02 三思博客 阅读(10) 评论(0) 推荐(0) 编辑
摘要:四剑客常用总结 find `find` 命令在Linux中是一个极其强大的工具,用于在文件系统中搜索符合特定条件的文件和目录。以下是 `find` 命令一些常用的选项: 1. **-name**:按名称查找文件。例如,查找所有扩展名为 `.txt` 的文件: ```bash find /path/t 阅读全文
posted @ 2024-03-15 15:38 三思博客 阅读(23) 评论(0) 推荐(0) 编辑
摘要:四剑客第六关 使用find将目前目录及字目录所有扩展名是c 的列出来 find . -name "*.c" 使用find 将当前目录和字目录所有一般文件列出 find . -type f [root@master ~]# find . -type f ./.bash_logout ./.bash_p 阅读全文
posted @ 2024-03-15 15:38 三思博客 阅读(18) 评论(0) 推荐(0) 编辑
摘要:四剑客第五关 1 查询file.txt 以abc结尾的行 grep 'abc$' file.txt ^ 开头 $ 结尾 [root@master ~]# cat file.txt sdhfks sdfsdg sdkjfhsdjh sdjfsdgf abcklsdfjksegfeabc ekhkeer 阅读全文
posted @ 2024-03-14 18:25 三思博客 阅读(11) 评论(0) 推荐(0) 编辑
摘要:四剑客第四关 1、说一些你比较常用linux指令 ls ls -l lsblk cat echo tty hostname hostnamectl -set-name ip a ping ifconfig netstat -tulpn ss -tulpn ps aux kill kill-9 lso 阅读全文
posted @ 2024-03-14 18:25 三思博客 阅读(9) 评论(0) 推荐(0) 编辑
摘要:四剑客第三关 1 find使用方法: 根据文件大小查找 命令: 根据文件权限查找数据 : find /etc/passwd -type f -size +10M find /etc/passwd -perm 755 [root@master ~]# find /etc/passwd -type f 阅读全文
posted @ 2024-03-14 18:25 三思博客 阅读(8) 评论(0) 推荐(0) 编辑
摘要:防火墙--学习笔记 防火墙分类: 硬件:华为 思科 深信服 软件: Windows: 360 电脑管家 linux :firewalld iptables 防火墙的作用: 隔离 严格过滤出站 入站 firewalld 设计流程 定义不同区域 每个区域制定自己配置通过的或者拦截--数据包 firewa 阅读全文
posted @ 2024-03-14 18:24 三思博客 阅读(56) 评论(0) 推荐(0) 编辑
摘要:定时任务 学习笔记 定时任务 自动完成操作命令 夜里自动备份数据 cp /data /backup 自动清理磁盘 软件 :cronie 查看软件安装目录 rpm -qa cronie rpm -ql cronie 关闭 systemctl stop cronie 启动 systemctl start 阅读全文
posted @ 2024-03-14 18:24 三思博客 阅读(12) 评论(0) 推荐(0) 编辑
摘要:四剑客第二关 快捷方式的使用方法 ctrl+e 将光标快速移动到行尾 ctrl+?? ?? 将光标按单词快速左右移动 ctrl+w 将空格分隔的一个字符串整体进行删除(剪切) ctrl+u 将光标所在位置到行首内容进行删除(剪切) ctrl+k 将光标所在位置到行尾内容进行删除(剪切) ctrl+y 阅读全文
posted @ 2024-03-13 23:08 三思博客 阅读(33) 评论(0) 推荐(0) 编辑
摘要:四剑客第一关 1.修改当前时间为明天日期 date -s "2024-03-14" date -s "$(date -d tomorrow +%Y-%m-%d)" 修改 date -s "$(date -d tomorrow +%Y-%m-%d)" [root@master ~]# date -s 阅读全文
posted @ 2024-03-13 23:07 三思博客 阅读(33) 评论(0) 推荐(0) 编辑
摘要:grep 第四天 1 使用grep 取 passwd 显示行数 grep -c '' /etc/passwd [root@master ~]# grep -c '' /etc/passwd 135 2 使用grep 取passwd 显示行号 grep -n '' /etc/passwd [root@ 阅读全文
posted @ 2024-03-12 19:52 三思博客 阅读(18) 评论(0) 推荐(0) 编辑
摘要:sed第三天 利用sed 取出ifconfIg ens33命令中本机的IPv4地址 可以百度扩展 了解即可 也可以用别的命令实现 只要有结果也可以 ifconfig ens33 | sed -n 's/.*inet \([0-9\.]\+\) .*/\1/p' ip a | grep -A2 'en 阅读全文
posted @ 2024-03-12 19:52 三思博客 阅读(15) 评论(0) 推荐(0) 编辑
摘要:find第二天 1.找出/tmp目录下,属主不是root,且文件名不以f开头的文件 find /tmp ! -user root -a ! -name 'f*' 或者 find /tmp ! -user root ! -name 'f*' 这条命令 find /tmp ! -user root ! 阅读全文
posted @ 2024-03-12 19:52 三思博客 阅读(28) 评论(0) 推荐(0) 编辑
摘要:awk第一天 1.用awk 打印整个test.txt (以下操作都是用awk工具实现,针对test.txt) awk '{print}' test.txt [root@master ~]# awk '{print}' test.txt hello world\! usr/root usr/root 阅读全文
posted @ 2024-03-11 22:40 三思博客 阅读(35) 评论(0) 推荐(0) 编辑
摘要:第十九天--第二十天 1.使用awk 打印 passwd 第二行 awk 'NR==2' /etc/passwd 2.统计/etc/services文件中有井号开头的行 grep -c '^#' /etc/services 或者 awk '/^#{c++} END{print c}' /etc/se 阅读全文
posted @ 2024-03-11 22:39 三思博客 阅读(17) 评论(0) 推荐(0) 编辑
摘要:第十八天 取出ifconfIg ens33命令中本机的IPv4地址 可以百度扩展 了解即可 记不住也没事 不常用 ifconfig ens33 | egrep -o 'inet [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/' |egrep -o '[0-9]+\.[0-9]+\.[ 阅读全文
posted @ 2024-03-10 21:19 三思博客 阅读(11) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示