zoukankan      html  css  js  c++  java
  • Linux的cat命令详解

    The cat command reads one or more files and copies them to standard output
    也就是说,cat命令读取文件,并显示在 standard output 中。正常情况下,也就是显示在屏幕上。

    cat 的另一个功能是 concatenate, 连接。如下面这条命令:

     cat movie.mpeg.0* > movie.mpeg
    

    将多个子mpeg文件合成为 movie.mpeg 文件。

    如果输入 cat 不带参数:

    cat
    

    将从 standard input (如键盘)中读入,直到按 Ctrl+d 来为作 EOF。读入的信息同样将显示在standard output 上。

    如果用以下命令:

    cat filename.txt
    

    从 standard input 读入的信息将被保存在 filename.txt 中。

    使用如下命令:

    cat < filename.txt
    

    则 shell 将从 filename.txt 中读取信息,并显示在 standard output 上。

    参考文献
    Shotts Jr, W. E. (2012). The linux command line: A complete introduction. No Starch Press.

  • 相关阅读:
    dijkstra 为什么不能解决负权边?
    Asteroids poj3041
    Dining poj3281
    炮兵阵地
    玉米田Corn Fields
    互不侵犯
    Golang---内存管理(内存分配)
    单例模式-Singleton
    HTTP2.0 学习
    Golang---GMP调度策略
  • 原文地址:https://www.cnblogs.com/yaos/p/6940469.html
Copyright © 2011-2022 走看看