zoukankan      html  css  js  c++  java
  • Linux-cat命令

    命令讲解:

    cat主要有三大功能:

    1.一次显示整个文件:cat filename

    2.从键盘创建一个文件:cat > filename 只能创建新文件,不能编辑已有文件.

    3.将几个文件合并为一个文件:cat file1 file2 > file

    实操验证:

    [154.8.159.209:root@xlp117 /var/www/html/log]# cat sms_status_pdd.log.2020-03-18
    ---
    2020-3-18 14:08:55
    POST /pdd/sms/status?appid=1400155389
    [{"mobile":"13126593380","report_status":"SUCCESS","description":"用户短信接收成功","errmsg":"DELIVRD","user_receive_time":"2019-11-09 00:00:01","sid":"98:6014940","nationcode":"86"}]
    POST http://10.30.30.74:18098/xlp/cmpp?action=receiveSmsStatus&spcode=100000&msgfmt=8 - 22ms
    [{"sid":"","uid":"","user_receive_time":"2019-11-09 00:00:01","error_msg":"DELIVRD","mobile":"13126593380","report_status":"SUCCESS","original":null}]
    200
    {"msg":"notfound","errorcode":"-1"}
    ---
    2020-3-18 14:27:11
    POST /pdd/sms/status?appid=1400155389
    [{"mobile":"13126593380","report_status":"SUCCESS","description":"用户短信接收成功","errmsg":"DELIVRD","user_receive_time":"2019-11-09 00:00:01","sid":"5031259","nationcode":"86"}]
    POST http://10.30.30.74:18098/xlp/cmpp?action=receiveSmsStatus&spcode=100000&msgfmt=8 - 19ms
    [{"sid":"1494363028144520720","uid":"","user_receive_time":"2019-11-09 00:00:01","error_msg":"DELIVRD","mobile":"13126593380","report_status":"SUCCESS","original":null}]
    200
    {"msg":"notfound","errorcode":"-1"}
    ---------------------------------------------------------------------------
    [154.8.159.209:root@xlp117 /home/wangzn209]# cat > filename.txt
    hello
    ^C
    [154.8.159.209:root@xlp117 /home/wangzn209]# ls
    filename.txt
    [154.8.159.209:root@xlp117 /home/wangzn209]# cat filename.txt
    hello
    [154.8.159.209:root@xlp117 /home/wangzn209]# cat >file1
    001
    ^C
    [154.8.159.209:root@xlp117 /home/wangzn209]# cat >file2
    002
    ^C
    [154.8.159.209:root@xlp117 /home/wangzn209]# ls
    file1 file2 filename.txt
    ---------------------------------------------------------------------------
    [154.8.159.209:root@xlp117 /home/wangzn209]# cat file1 file2 > file
    [154.8.159.209:root@xlp117 /home/wangzn209]# ls
    file file1 file2 filename.txt
    [154.8.159.209:root@xlp117 /home/wangzn209]# cat file
    001
    002

  • 相关阅读:
    C#面向对象的基本原则
    EXTJS学习笔记:类似于Window的登录窗体
    c# 类似于QQ表情弹出框功能的二种实现方法
    EXTJS学习笔记:grid之分组实现groupingview
    RibbonBar屏蔽右键
    webservice安全性浅谈
    js生成二维码以及插入图片
    c++之const解惑
    最短路径连接表形式
    深入理解c++之动态内存和指针
  • 原文地址:https://www.cnblogs.com/wangzn/p/12564922.html
Copyright © 2011-2022 走看看