`
Javaloverlover
  • 浏览: 343160 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

linux command之cat

阅读更多

-n 或 --number 由 1 开始对所有输出的行数编号
-b 或 --number-nonblank 和 -n 相似,只不过对于空白行不编号
-s 或 --squeeze-blank 当遇到有连续两行以上的空白行,就代换为一行的空白行

cat filename:输出文件内容;

cat file1 file2:输出多个文件内容;

cat file1 > file2:将file1的内容放到file2中;

cat file1 file2 >> file3:将file1和ile2的内容放到file3中;

cat > file1 输入enter键,然后输入内容,在空行上输入ctrl+D,将内容输入到file1中

">"和">>"区别:">"表示输入到,">>"追加内容;

cat -n 输出带编号;

cat -b 对空行不编号;

cat -s 对多行空行用一行代替;

分享到:
评论

相关推荐

    Linux命令搜索工具linux-command.zip

    Linux编程之内存映射 Linux知识点小结 10大白帽黑客专用的 Linux 操作系统 软件工具 超赞的Linux软件 Github仓库Zh En 程序员喜欢的9款最佳的...

    linux command

    名称:cat 使用权限:所有使用者 使用方式:cat [-AbeEnstTuv] [--help] [--version] fileName 说明:把档案串连接后传到基本输出(萤幕或加 > fileName 到另一个档案)

    Command Line Fundamentals

    Command Line Fundamentals begins by exploring the basics, and then focuses on the most common tool, the Bash shell (which is standard on all Linux and iOS systems). As you make your way through the ...

    busybox command help.pdf

    BusyBox 是一个集成了三百多个最常用Linux命令和工具的软件。BusyBox 包含了一些简单的工具,例如ls、cat和echo等等,还包含了一些更大、更复杂的工具,例grep、find、mount以...

    qpress-11-linux-x64.tar

    xtrabackup version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 97330f7) 170921 14:04:52 [01] decompressing ./xtrabackup_logfile.qp sh: qpress: command not found cat: write error: ...

    Linux基础知识学习笔记.docx

    Linux命令的格式(command为必填,其余为选填):command(命令) + [-options](选项) + [parameter1](参数) … 前面有“-”代表选项,无代表参数(参数与选项无前后关系) 1.ls :显示当前路径(当前文件夹)下的...

    Linux FTP服务配置

     When enabled, a special FTP command known as "async ABOR" will be enabled. Only ill advised FTP clients will use this feature.Addtionally, this feature is awkward to handle, so it is dis-abled by ...

    Linux Shell Scripting Cookbook

    Concatenating with cat 50 Recording and playback of terminal sessions 53 Finding files and file listing 55 Playing with xargs 63 Translating with tr 69 Checksum and verification 72 Sorting, unique and...

    Linux使用教程(教程)

    4.Command mode功能键列表 117 5.Last line mode下指令简介 118 ※十一、ifconfig 119 十二、write 命令 122 用途: 122 语法: 123 描述: 123 工作站 123 参数 123 标志 124 退出状态 124 示例 124 文件 125 十三...

    Linux操作系统基础教程

    Linux 操作系统基础教程 清华大学信息学院计算机系 目 录 前言..........................................................................................................................................

    Linux常用的命令。。。。。

    sed 's/cat/dog/' cats 将cats 文件中cat 替换成dog cd – 可以使回到上次的目录 eg./tmp/jack/rose/love 先在love 目录下,后回到jack目录下cd – 后回到love 目录下 /etc/passwd /etc/shadow /etc/group /etc/...

    redhat linux教材20课程学习文档

    4.3.2 vi 的命令模式(Command mode) 4.3.3 vi 的底线模式(Last line mode) 4.3.4 vi 三种模式的切换 4.4 在文件中快速移动光标 4.4.1 基本的移动方式 4.4.2 在同一行中移动光标 4.4.3 在页面间移动光标 4.4.4 在...

    overlay-text-linux:使用osd_cat将视频上的文字叠加在屏幕上

    它使用osd_cat -bin debian / ubuntu软件包中的osd_cat命令。 用法 '-t':显示在顶部,始终是第一个参数 '-b':显示在底部,始终是第一个参数 例子 在顶部显示两行(最多4行,或修改overlay.sh脚本) ./overlay.sh...

    HUAWEI ME909s-821 4G模块完整原厂资料

    华为模块Linux内核驱动集成指导-(V100R001_V2.0, Chinese) ME909s-821Mini PCIe ME909S-821高性能海思cat4模块 ME909s-821Mini PCIe HUAWEI ME909s-821 LTE Module AT Command Interface Specification-(V100R001_...

    在linux系统下安装python librtmp包的实现方法

    安装librtmp包需要依赖环境较多,机器上已经安装了python2.7版本,安装librtmp包之前需要先安装依赖环境。 1、安装gcc和依赖包 yum install gcc* python-devel libffi-dev* -y 2、安装librtmp ...

    the_colonel:带有键盘记录器和内置 IRC bot 的实验性 linux 内核模块 (rootkit)

    ##用法####本地要传递命令,请使用包含的程序: ./rtcmd <command>或 echo: echo -n <command> >> /proc/colonel 查看可用命令: ./rtcmd help或cat /proc/colonel 注意:自定义 /proc 文件在 /proc 的内容列表中...

    Linux常见命令

    Linux / Unix 命令格式 command [-选项...] [参数...] 如: ls -a ~ 标准输出: 就是在控制台(终端, 命令行)的默认输出 ls pwd cat 等命令的默认输出都是标准输出 "|" 是管道符号, 可以连接两个命令, 将前一个命令 的...

    cmd操作命令和linux命令大全收集

    CMD命令:开始->运行->键入cmd或command(在命令行里可以看到系统版本、文件系统版本) 命令大全 1. gpedit.msc-----组策略 2. sndrec32-------录音机 3. Nslookup-------IP地址侦测器 ,是一个 监测网络中 DNS...

    入门学习Linux常用必会60个命令实例详解doc/txt

    ◆ 文件处理命令:file、mkdir、grep、dd、find、mv、ls、diff、cat、ln; ◆ 系统管理相关命令:df、top、free、quota、at、lp、adduser、groupadd、kill、crontab; ◆ 网络操作命令:ifconfig、ip、ping、...

    操作系统课程实验.rar

    (1)熟悉 linux 常用命令:pwd,useradd,passwd, who, ps, pstree, kill, top, ls, cd, mkdir, rmdir, cp, rm, mv, cat, more, grep 等。 (2) 实现一个模拟的 shell: 编写三个不同的程序 cmd1.c,cmd2.c,cmd3.c,...

Global site tag (gtag.js) - Google Analytics