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 -i
package_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在里头--在博客园显示效果挺 ...
随机推荐
- hadoop mapreduce 写入hbase报错 Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
现象:map任务构造数据正常,reduce任务,开始也正常,速度很快 ,在hbase 的管理界面,可以看到,5W以上的请求数 当reduce 执行到 70% 左右的时候,就堵住了,查看yarn的web ...
- 2019.02.09 codeforces gym 100548F. Color(容斥原理)
传送门 题意简述:对n个排成一排的物品涂色,有m种颜色可选. 要求相邻的物品颜色不相同,且总共恰好有K种颜色,问所有可行的方案数.(n,m≤1e9,k≤1e6n,m\le1e9,k\le1e6n,m≤ ...
- 2019.01.02 洛谷P4512 【模板】多项式除法
传送门 解析 代码: #include<bits/stdc++.h> #define ri register int using namespace std; typedef long l ...
- 2018.12.19 atcoder Iroha and a Grid(组合数学)
传送门 组合数学好题. 给你一个hhh行www列的网格,其中左下角aaa行bbb列不能走,问从左上角走到右下角有多少种走法(每次只能向右或者向下) 我们考虑分步计数. 我们一共能走的区域是总网格区域去 ...
- MFC随笔
设置映射模式 Y轴改为向上 dc.SetMapMode(MM_LOENGLISH);//低精度 dc.SetMapMode(MM_HIENGLISH);//高精度 文本对齐 dc.SetTextAl ...
- JAVA技术路线2
https://www.zhihu.com/question/56110328 1.JavaSE学习视频 http://pan.baidu.com/s/1bp3g6rd2.javaweb的学习视频 h ...
- Keras分类问题
#-*- coding: utf-8 -*- #使用神经网络算法预测销量高低 import pandas as pd #参数初始化 inputfile = 'data/sales_data.xls' ...
- asp.net 多线程
//开启一条线程并执行一个方法 Thread oThread = new Thread(new ThreadStart(IIMsSqlToSqlitle2)); oTh ...
- 在window平台下,自己DIY编译OpenSSL,Libcurl ,来支持HTTPS传输协议
1 缘起 原来就了解些libcurl,一直没有机会在项目实际使用libcurl. 恰好最近一个云存储的项目,服务器使用openstack 恰好我负责现在的一个云存储SDK c++版本的开发中. 与 ...
- Eclipse环境下如何配置tomcat,并且把项目部署到Tomcat服务器上
打开Eclipse,单击“Window”菜单,选择下方的“Preferences”. 单击“Server”选项,选择下方的“Runtime Environments”. 点击“Add”添加Tomca ...