vi - a linux command

创建一个文件的linux命令,参考格式如下——

vi hello.txt

保存或退出命令的操作——
ESC键 跳到命令模式,然后:
:w   保存文件但不退出vi
:w file 将修改另外保存到file中,不退出vi
:w!   强制保存,不推出vi
:wq  保存文件并退出vi
:wq! 强制保存文件,并退出vi
q:  不保存文件,退出vi
:q! 不保存文件,强制退出vi
:e! 放弃所有修改,从上次保存文件开始再编辑

时间: 2024-10-09 18:13:46

vi - a linux command的相关文章

Linux Command Backup

User Structure linux command review 列出所有信号 找到名字后,kill 或者用ps找到 kill同名进程 每隔一秒高亮显示网络链接数的变化情况 启动关闭制定网卡 关闭网卡并修改MAC地址 配置IP地址 显示当前路由器 添加网关 删除网关 下载到本地 显示TCP连接 socket 摘要 列出所有打开的网络连接端口 显示所有UDP Sockets User create an account useradd shanshan delete an account u

10 Interesting Linux Command Line Tricks and Tips Worth Knowing

I passionately enjoy working with commands as they offer more control over a Linux system than GUIs(Graphical User Interfaces) applications, therefore am always on the look out to discover or figure out interesting ways and ideas to make Linux so eas

[Linux Command Line and Shell Scripting Bible] basic shell script

1 #!/bin/bash 2 ############################################ 3 # @content chapter 8,9 of Linux Command Line and Shell Scripting Bible 4 # @reader gavin 5 # @date 2014/12/14 6 ############################################ 7 CHAPTER 8 8 9 + user varriab

[Linux/Command] wc

wc 命令可以打印目标文件的换行.单词和字节数.其中换行数 = 总行数 - 1,单词数则按照空格分隔的英文单词数进行统计,也就是说连续的汉字(短语.句子)都视作一个单词. NAME wc - 打印每个目标文件的换行.单词和字节数量. SYNOPSIS wc [OPTION]... [FILE]... wc [OPTION]... --files0-from=F DESCRIPTION 打印每个目标文件的换行.单词和字节数量,如果给定多个目标文件,则同时打印汇总数量. 如果不给定目标文件,或者给定

Linux command automake

Linux command automake [Purpose]        Learning linux command automake for generate Makefile.in for configure from Makefile.am   [Eevironment]        Ubuntu 16.04 terminal   [Procdeure]        example: 如何安装: sudo apt-get autoremove automake sudo apt

Linux command stty

Linux command stty reference: https://blog.csdn.net/lqxandroid2012/article/details/78929506 [Purpose]        Learning linux command stty for get/set serial uart speed    [Eevironment]        Ubuntu 16.04 terminal   [Procdeure]        example get uart

linux command lynx

[Purpose]        Learning linux command  lynx   [Eevironment]        Ubuntu 16.04 terminal   apt-get install lynx usage assic to strage web content example: [email protected]:/media/vmuer/share# lynx -dump http://www.ruanyifeng.com/blog/2018/12/git-b

linux command intro2 vi

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 th

Linux Command Line 笔记(1)

Yunduan CUI graphical user interfaces make easy tasks easy, while command line interfaces make difficult tasks possible Part 1 学习Shell 1. 什么是 Shell? Shell 是用户与操作系统交流的程序,它读取用户的键盘输入并交由操作系统执行相应的命令.所有linux都支持一个叫做 bash 的shell,它的全称是 "Bourne Again SHell&quo