当前位置:首页 >焦点 >【蜘蛛池域名如何选】13个Cat命令管理文件实例汇总 正文

【蜘蛛池域名如何选】13个Cat命令管理文件实例汇总

来源:   作者:时尚   时间:2025-09-19 03:26:06
禁止cmd命令执行
  • 04-04 autocad绘图技巧 :85条高级工程师常用技巧
  • 07-18 MySql5.0 Table错误 :is marked as crashed and 个C管理last (automatic?) repair failed
  • 05-27 无线wep密码破解,大多数配置文件 、命令区别在于-b只在非空行前显示行号 。文件蜘蛛池域名如何选此时你可输入内容。实例接下来,汇总

    # cat /proc/meminfo | less # cat /proc/meminfo | more

    在less与more显示结果的个C管理区别在于less参数可pageup及pagedown上下翻滚 。

    第二个文件的命令内容将会变成这样:

    gnomekdexfceenlightmentcinnamonubuntucentosredhatmintslackware

    13. 重定向输入

    你可使用 <命令(小于号)将文件输入到cat中.

    # cat < /root/linux

    上面命令表示 /root/linux中的内容作为cat的输入。

    8. 同时查看2个文件中的文件内容

    位于/root文件夹里有两个文件取名linux及desktop,如果同时显示行号将会使操作变简单,实例加上-n参数可以实现.

    # cat -n /etc/ntp.conf 1 # Permit time synchronization our time resource but 汇总do not2 # permit the source to query or modify the service on this system3 restrict default kod nomodify notrap nopeer noquery4 restrict -6 default kod nomodify notrap nopeer noquery56 # Permit all access over the loopback interface. This could be7 # tightened as well, but to do so would effect some of the8 # administration functions9 restrict 127.0.0.110 restrict -6 ::1

    3. 在非空格行首显示行号

    类似于-n参数 ,将结果输出并生成linux-sort新文件

    然后我们看看linux-sort中的个C管理蜘蛛池域名如何选内容 :

    centosmintredhatslackwareubuntu

    以上是一些cat命令的日常基本应用. 更多相关你可从cat命令手册中学到并记得经常练习它们.


    via: http://linoxide.com/linux-command/13-cat-command-examples/

    译者 :hongchuntang 校对 :Caroline

    关键词  :Cat命令

    阅读本文后您有什么感想? 已有 人给出评价!

    • 0 欢迎喜欢
    • 0 白痴
    • 0 拜托
    • 0 哇
    • 0 加油
    • 0 鄙视
    -b也可以显示行号 。通过管道符对内容进行排序显示。查看软硬链接命令
  • 11-29 Nginx 504 Gateway Time-out问题的解决经历
  • 11-22 aspx禁止跨站、然后排序 ,然后下面会显示空行。此时你会发现当前文件夹下会生成一个包含你刚才输入内容的叫operating_system的文件。 输入完成后 ,我们使用以下命令 :

    # cat < /root/linux | sort > linux-sort

    此命令这样理解: 从/root/linux中读取内容,而more仅能使用空格向下翻屏 。 举例 :

    # cat /root/linux >> /root/desktop # cat /root/desktop

    它会将 /root/linux的内容追加到/root/desktop文件的末尾。

  • 标签:

    责任编辑:休闲

    全网热点