Note of The Linux Command Line
心得
在用鼠标点击的图形化桌面之前,单纯用键盘操作软件的时代已经很成熟了。并且还在这样延续下去。鼠标不是电脑操作的唯一模式,至少不是程序员的。
在黑色屏幕下,因为没有鼠标所以只能用按键来操作软件。包括复制、粘贴、光标移动、内容查找和替换等。用键盘操作的高效性在那个时候是没有办法的办法。形成了这种手不离键盘就能操作电脑的习惯之后,即使现在有了鼠标,相比起来鼠标的效率确实要低发发呆
Cutting and Pasting

Shell Script
双引号:双引号的整体是一个字符串,但是字符内容又支持变量($),反引号之间Shell命令和$(...)内的表达式(仅空格脱意,即保留空格);
单引号:单引号的内容是纯字符内容(全部脱意),什么都不要执行;
反引号:反引号的部分为Shell命令;
x='ls *.{txt,log}'
将ls *.{txt,log}的Shell命令执行结果赋给x。
Move the cursor
0 move to then head
O insert a new line before
o insert a new line after
x delete a character
dd delete a line
u undo
Delete and copy
NXX N lines
XW copy word
X0 current to head of current line
X^ current to head of file
X$ current to tail of current line
XG all file
X20G from line 20 to end of file
X={d,y}
d delete
y yank(copy)
Replace
scope s/<pattern>/<replace-to>/g
eg.
%s/ok/g
With g to replace all,or replace the first matched.
2,$s/ok/
Replace scope is from line 2 to the end of file.
Multi file edit
vi foo.txt bar.txt
To open multi file for editing.
:n to move to next opened file
:N to move to previous opened file
:buffers to show all opened files in list(only vim works?)
:buffer N to move to Nth file of buffered file list
Use PS1 to Chang prompt
...
Package management
Installing a Package from a Repository
Debian
apt-get update
apt-get install package_name
Red Hat
yum install package_name
Installing a Package from a Package File
Debian
dpkg --install package_file
Red Hat
rpm -ipackage_file
Note of The Linux Command Line的更多相关文章
- Linux Command Line Basics
Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...
- Linux Command Line 解析
Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...
- 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 ...
- 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令
Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...
- 《The Linux Command Line》 读书笔记02 关于命令的命令
<The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...
- 《The Linux Command Line》 读书笔记01 基本命令介绍
<The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...
- 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( ...
- Reso | The Linux Command Line 的中文版
http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...
- [笔记]The Linux command line
Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...
随机推荐
- 2018.11.07 NOIP训练 lzy的游戏(01背包)
传送门 考虑对于每次最后全部选完之后剩下的牌的集合都对应着一种构造方法. 一个更接地气的说法: 设消耗的牌数为ttt,如果使用的牌的lll值之和也为ttt,则对应着一种构造方式让这种情形成立. 于是做 ...
- Codeforces Round #541 (Div. 2) E 字符串 + 思维 + 猜性质
https://codeforces.com/contest/1131/problem/D 题意 给你n个字符串,字符串长度总和加起来不会超过1e5,定义字符串相乘为\(s*s1=s1+s[0]+s1 ...
- 表单提交textarea内容,第一次获取不到值,第二次才能获取到的解决方法:
因为KindEditor的可视化操作在新创建的iframe上执行,代码模式下的textarea框也是新创建的,所以最后提交前需要执行 sync() 将HTML数据设置到原来的textarea. Kin ...
- call和apply的作用实例
<script> var scopeTest = function(){ //考察了 this 的含义 window.a=2; function fn(b){ this.b = b; co ...
- DDR中的一些知识点说明(ODT,ZQ校准,OCT,TDQS)
ODT ( On-DieTermination ,片内终结)ODT 也是 DDR2 相对于 DDR1 的关键技术突破,所谓的终结(端接),就是让信号被电路的终端吸 收掉,而不会在电路上形成反射, 造成 ...
- BT656与BT1120的区别
从ITU-R BT1120文档上可知,BT1120支持的是1080p: 文档定义一帧为1 125 总行数和1 080 有效行:每行有效像素为1920图像频率60. 50. 30. 25 和 24H ...
- 程序重复报more than 'max_user_connections' active connections问题解决
早晨,开发扔过来一个问题,截图如下: ums already has more than 'max_user_connections' active connections 查看数据库发现: 最大连接 ...
- AtCoder Beginner Contest-060
A - Shiritori Problem Statement You are given three strings A, B and C. Check whether they form a wo ...
- Alpha阶段敏捷冲刺(三)
1.提供当天站立式会议照片一张. 2.每个人的工作 (有work item 的ID),并将其记录在码云项目管理中: 昨天已完成的工作. 吴玲:一边学习,一边参考别人的代码. 王兴:完成了数据库的初步搭 ...
- ajax请求也可以用form表单向后台提交数据!!!!
激动的我简直语无伦次,不说了上代码,用ajax实现form表单数据的请求,啦啦啦啦 html: <form> <input name="userName" val ...