网站首页 站内搜索

搜索结果

查询Tags标签: centos79,共有 30条记录
  • linux系统中批量提取指定行的数据

    1、测试数据[root@centos79 test]# cat a.txt 01 3 4 02 f s 03 t 3 04 s d 05 g i 06 y e 07 a w 08 d g 09 e w 10 n u 11 7 8 12 3 s 13 a d 14 g e 15 w a 16 z v 17 n m 18 k p 2、提取 3,5,7,8,9,15,17行 使用sed[root@centos79 test]# ls a.txt lines [root@cent…

    2021/7/22 7:06:32 人评论 次浏览
  • linux系统中diff命令

    1、测试文件[root@centos79 test]# cat a.txt 3 5 6 s f s d g d e w f g e k [root@centos79 test]# cat b.txt 3 5 6 s f s d g d e w f g e k 2、直接使用diff[root@centos79 test]# cat a.txt 3 5 6 s f s d g d e w f g e k [root@centos79 test]# cat b.txt 3 5 6 …

    2021/7/19 7:04:52 人评论 次浏览
  • linux系统中diff命令

    1、测试文件[root@centos79 test]# cat a.txt 3 5 6 s f s d g d e w f g e k [root@centos79 test]# cat b.txt 3 5 6 s f s d g d e w f g e k 2、直接使用diff[root@centos79 test]# cat a.txt 3 5 6 s f s d g d e w f g e k [root@centos79 test]# cat b.txt 3 5 6 …

    2021/7/19 7:04:52 人评论 次浏览
  • linux系统中删除文件的第一列

    1、测试数据[root@centos79 test]# cat a.txt e t q t x g a w i k h e 2、cut删除[root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cut -d " " -f 2- a.txt t q t g a w k h e 3、sed删除[root@centos79 test]# cat a.txt e…

    2021/7/17 7:05:08 人评论 次浏览
  • linux系统中删除文件的第一列

    1、测试数据[root@centos79 test]# cat a.txt e t q t x g a w i k h e 2、cut删除[root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cut -d " " -f 2- a.txt t q t g a w k h e 3、sed删除[root@centos79 test]# cat a.txt e…

    2021/7/17 7:05:08 人评论 次浏览
  • linux系统中如何将文件的某一类替换为其他文件的指定列

    1、测试数据[root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cat b.txt 4 5 6 2 d 2 s g y 2、将b.txt中的第2列用a.txt中的第3列进行替换[root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cat b.txt 4 …

    2021/7/17 7:05:04 人评论 次浏览
  • linux系统中如何将文件的某一类替换为其他文件的指定列

    1、测试数据[root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cat b.txt 4 5 6 2 d 2 s g y 2、将b.txt中的第2列用a.txt中的第3列进行替换[root@centos79 test]# cat a.txt e t q t x g a w i k h e [root@centos79 test]# cat b.txt 4 …

    2021/7/17 7:05:04 人评论 次浏览
  • linux系统中查看逻辑cpu个数、物理cpu个数、每个cpu的核心数、cpu型号

    1、逻辑cpu个数(线程数)[root@centos79 test]# cat /proc/cpuinfo | grep "processor" processor : 0 processor : 1 processor : 2 processor : 3 [root@centos79 test]# cat /proc/cpuinfo | grep "processor" | wc -l 4…

    2021/7/10 7:07:37 人评论 次浏览
  • linux系统中查看逻辑cpu个数、物理cpu个数、每个cpu的核心数、cpu型号

    1、逻辑cpu个数(线程数)[root@centos79 test]# cat /proc/cpuinfo | grep "processor" processor : 0 processor : 1 processor : 2 processor : 3 [root@centos79 test]# cat /proc/cpuinfo | grep "processor" | wc -l 4…

    2021/7/10 7:07:37 人评论 次浏览
  • linux系统中sed命令删除指定行及其后的若干行

    1、测试数据[root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、删除匹配k的行及其后2行[root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s [root@centos79 test]# sed /k/,+2d a.txt 3 4 5 d g 3 s …

    2021/7/9 7:05:52 人评论 次浏览
  • linux系统中sed命令整行替换

    1、测试数据[root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、将第2行替换为xxxx[root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s [root@centos79 test]# sed 2c xxxx a.txt 3 4 5 xxxx s g 8 k …

    2021/7/9 7:05:46 人评论 次浏览
  • linux系统中sed命令在指定行前(后)插入内容

    1、测试数据如下:[root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s 2、在第2行后插入xxxx[root@centos79 test]# cat a.txt 3 4 5 d g 3 s g 8 k s g 2 5 d s c w a r t e 4 s [root@centos79 test]# …

    2021/7/9 7:05:41 人评论 次浏览
  • linux中查找包含特定字符的文件

    1、测试数据[root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g e u c j alike i x k like w f g liker s g e g [root@centos79 test]# echo "b.txt c.txt d.txt" | xargs -n 1 cp a.txt [root@centos79 test]# ls a.txt b.txt c.txt d.t…

    2021/7/5 7:25:07 人评论 次浏览
  • linux系统中如何删除空行

    linux系统中如何删除空行。 1、测试数据 a.txt[root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r ei x k like a f g liker [root@centos79 test]# cat -A a.txt a g r e$ $ ## 空行什么也没有 i x k like$ a f g liker$ [root@cento…

    2021/7/5 7:23:06 人评论 次浏览
  • linux系统中如何将多个连续的空行合并为一个空行

    1、测试数据如下[root@centos79 test]# ls a.txt [root@centos79 test]# cat a.txt a g r ei x k like a f g liker [root@centos79 test]# cat -A a.txt a g r e$ $ $ $ $ i x k like$ a f g liker$ 2、将多个空行合并为一个空行[root@centos79 test]# ls a.txt [root@c…

    2021/7/5 7:21:59 人评论 次浏览
共30记录«上一页12下一页»
扫一扫关注最新编程教程