摘要: linux系统中find命令 1、直接查找文件名 测试文件如下: [root@centos79 test]# ls 01.txt 02.csv 02.txt 03.csv 04.txt [root@centos79 test]# find "02.txt" 02.txt [root@centos79 阅读全文
posted @ 2021-07-05 22:15 小鲨鱼2018 阅读(242) 评论(0) 推荐(0)
摘要: 1、查看环境变量 [root@centos79 tmp]# export | wc -l 29 [root@centos79 tmp]# export declare -x HISTCONTROL="ignoredups" declare -x HISTSIZE="1000" declare -x 阅读全文
posted @ 2021-07-05 21:48 小鲨鱼2018 阅读(821) 评论(0) 推荐(0)
摘要: 1、rename命令 [root@centos79 test]# ls a.mp4 dup1.mp4 dup2.mp4 dup4.mp4 [root@centos79 test]# rename mp4 txt *.mp4 [root@centos79 test]# ls a.txt dup1.tx 阅读全文
posted @ 2021-07-05 19:42 小鲨鱼2018 阅读(237) 评论(0) 推荐(0)
摘要: 1、别名配置文件为 ~/.bashrc. 例如将:为‘echo $?’命令指定别名为q: [root@centos79 ~]# vim ~/.bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias c 阅读全文
posted @ 2021-07-05 18:57 小鲨鱼2018 阅读(557) 评论(0) 推荐(0)
摘要: 1、tr命令 -s 参数将多个连续的字符压缩为一个字符 [root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt aaabbbaaaccc a a bbbb ddddcccc [root@centos79 test]# tr -s 阅读全文
posted @ 2021-07-05 18:20 小鲨鱼2018 阅读(1082) 评论(0) 推荐(0)
摘要: 1、split按文件大小拆分文件 测试数据如下: [root@centos79 test]# dd if=/dev/zero bs=1M count=100 of=a.txt 100+0 records in 100+0 records out 104857600 bytes (105 MB) co 阅读全文
posted @ 2021-07-05 17:33 小鲨鱼2018 阅读(331) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@centos79 test]# cat a.txt a g a d g d a d g d g e g d a a a a d g d a a [root@centos79 test]# awk -F "a" '{print NF - 1}' a.txt ## 统计每行a出 阅读全文
posted @ 2021-07-05 00:03 小鲨鱼2018 阅读(245) 评论(0) 推荐(0)
摘要: 1、测试数据 [root@centos79 test]# ls a.txt b.txt [root@centos79 test]# cat a.txt a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 [root@centos79 test]# cat b.txt b1 b2 b3 b4 阅读全文
posted @ 2021-07-05 00:00 小鲨鱼2018 阅读(174) 评论(0) 推荐(0)