vi

cusor :

0 : to the beginning of the current line

$ : to the end of the current line

G : to the last of the file

gg :   to the beginning of the file

Delete:

dd : delete the current line

dG :from the current line to the end of the file

d20G: from the current line tot the 20th line of the file

d$ :From the current cursor location to the end of the current line

d : also used to cut data

y : use to copy data

p : used to paste data

yy: copy the current line

 

:%s/Line/line/g

%  Specifies the range of lines for the operation. %is a shortcut
meaning from the first line to the last line.

s  Specifies the operation—in this case, substitution (search and
replace).

/Line/line/ The search pattern and the replacement text.

g  This means global

linux command intro2 vi的更多相关文章

  1. 10个你必须掌握的Linux超酷VI命令技巧

    大部分Linux开发者对vi命令相当熟悉,可是遗憾的是,大部分开发者都只能掌握一些最常用的Linux vi命令,下面介绍的10个vi命令虽然很多不为人知,但是在实际应用中又能让你大大提高效率. 在使用 ...

  2. 15 Examples To Master Linux Command Line History

    When you are using Linux command line frequently, using the history effectively can be a major produ ...

  3. Linux学习笔记--vi

    在Linux上使用vi命令修改一个文件内容的时候,发现无法保存,每次写完使用“:q!”命令可以正常退出但是使用":wq!"命令保存文件并退出时出现一下信息提示: E212: Can ...

  4. Linux系统的vi命令

    Linux系统的vi命令 vi编辑命令 1,格式: #vi filename 2,用法: //打开或新建文件,并将光标置于第一行首 #vi + filename //打开文件,并将光标置于第n行首 # ...

  5. Linux命令之vi/vim(一)

    vi仅仅是一个文本编辑器,可以给字符着色,可以自动补全,但不具备windows下word的排版功能.Vim是Vi improved的缩写,是vi的改进版. vi和vim的区别: 多级撤销.在vi中按u ...

  6. Linux Command Backup

    User Structure linux command review 列出所有信号 找到名字后,kill 或者用ps找到 kill同名进程 每隔一秒高亮显示网络链接数的变化情况 启动关闭制定网卡 关 ...

  7. 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令

    Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...

  8. 《The Linux Command Line》 读书笔记02 关于命令的命令

    <The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...

  9. 《The Linux Command Line》 读书笔记01 基本命令介绍

    <The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...

随机推荐

  1. [CLR via C#]13. 接口

    一.类和接口继承 在Microsoft.Net Framwork中,有一个名为System.Object的类,它定义了4个公共实例方法:ToString, Equals, GetHashCode和Ge ...

  2. .NET中Debug模式与Release模式

    Visual Studio 项目对程序的发布和调试版本分别有单独的配置.顾名思义,生成调试版本的目的是用于调试,而生成发布版本的目的是用于版本的最终分发. 如果在 Visual Studio 中创建程 ...

  3. Java synchronized关键字用法(清晰易懂)

    本篇随笔主要介绍 java 中 synchronized 关键字常用法,主要有以下四个方面: 1.实例方法同步 2.静态方法同步 3.实例方法中同步块 4.静态方法中同步块 我觉得在学习synchro ...

  4. web api post注意事项

    黄色笑话 近期一个项目需要使用到web api 在使用过程中,对应get请求方式的使用基本没出什么问题 但是对于post请求状况百出. 今将遇到的的问题列出.以作借鉴. 问题  -----post方式 ...

  5. 【.net程序破解】实战之标志位破解绕过注册法

    今天有时间玩了下一个不错的软件Advanced System Cleaner,可惜要注册 于是想办法给破解了,这是跟之前不同的地方,属于.NET破解教程: 软件地址 - http://www.crsk ...

  6. RHEL7管道与重定向

    文件描述符 可以理解为linux跟踪打开文件,而分配的一个数字,这个数字有点类似c语言操作文件时候的句柄,通过句柄就可以实现文件的读写操作 用户可以自定义文件描述符范围是:3-num,这个最大数字,跟 ...

  7. Struts2(十一)OGNL标签三与Struts2标签

    一.UI标签 二.简单例子 <h1>添加信息</h1> <!--通过指定theme的属性改变主题 --> <s:form action="" ...

  8. 在xib中添加手势控件后运行可能会出现的错误

    如果出现错误: // -[UITapGestureRecognizer superview]: unrecognized selector sent to instance 0x8e407a0 // ...

  9. 使用ObjectOutputStream进行socket通信的时候出现固定读到四个字节乱码的问题

    问题描述: 最近在写一个通信相关的项目,服务器端和客户端通过socket进行通信.本来想利用read的阻塞特性,服务器端和客户端按照一定的流程进行文件读写.结果发现客户端或者服务器read方法一直都返 ...

  10. 3、IOS开发--iPad之仿制QQ空间 (为HomeViewController添加交互逻辑 并 为导航条内容添加UISegmentedControl)

    1. 为bottomMenu添加点击效果 思路描述:        需求:        点击BottomButton的三个item,然后对应响应的是HomeViewController弹出对应的业务 ...