心得

在用鼠标点击的图形化桌面之前,单纯用键盘操作软件的时代已经很成熟了。并且还在这样延续下去。鼠标不是电脑操作的唯一模式,至少不是程序员的。

在黑色屏幕下,因为没有鼠标所以只能用按键来操作软件。包括复制、粘贴、光标移动、内容查找和替换等。用键盘操作的高效性在那个时候是没有办法的办法。形成了这种手不离键盘就能操作电脑的习惯之后,即使现在有了鼠标,相比起来鼠标的效率确实要低发发呆

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的更多相关文章

  1. Linux Command Line Basics

    Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...

  2. Linux Command Line 解析

    Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...

  3. 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 ...

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

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

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

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

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

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

  7. 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( ...

  8. Reso | The Linux Command Line 的中文版

    http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...

  9. [笔记]The Linux command line

    Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...

随机推荐

  1. poj-3067(树状数组)

    题目链接:传送门 题意:日本有东城m个城市,西城m个城市,东城与西城相互连线架桥,判断这些桥相交的次数. 思路:两个直线相交就是(x1-x2)*(y1-y2)<0,所以,对x,y进行排序,按照x ...

  2. dex2jar 和 jd-gui 的安装与使用(转)

    出处:https://blog.csdn.net/katrinawj/article/details/80016315 将APK直接解压(修改后缀名为.zip,然后解压)后,可以看到目录下包含一个cl ...

  3. latex去掉页眉

    \begin{document}之前添加 \fancyhead{} 即: \fancyhead{} \begin{document}

  4. 将批量指定的docker镜像打成文件

      #/bin/bash tag= img1=hub.chinacloud.com.cn/onex.dev/one-task-scheduler:$tag img2=hub.chinacloud.co ...

  5. 用mathematica求六元一次方程组且方程个数比变量个数少一个

    问题详见知乎:https://www.zhihu.com/question/68000713 我的问题:有5个方程,6个变量,其实我是想求出来de1=(系数)*dS1的形式,系数有Cij组成,Cij为 ...

  6. mouseover和mouseout事件的相关元素

    在发生mouseover和mouseout事件时,还会涉及更多的元素,这两个事件都会涉及把鼠标指针从一个元素的边界之内移动到另一个元素的边界之内.对mouseover事件而言,事件的主目标获得光标元素 ...

  7. max10之pll时钟源切换

    问题3:PLL切换功能中,多次切换可能造成PLL锁不定 从现象看clkbadx信号是不影响的,但locked信号一定是有影响的.

  8. 5.Vue临时上传文件夹

    1.在项目目录中,通过npm install multiparty进行安装必要组件npm install multiparty --save-dev 2.app.js中添加app.use(bodyPa ...

  9. mysql_变量

    set names gbk; 变量 变量分为两种:系统变量,自定义变量 系统变量:系统定义好的,大部分情况用户不需要使用系统变量,如autocommit,auto_increment_incremen ...

  10. codeforces 434D

    题意:有n<=50个点,每个点有xi有[li, ri]种取值,-100 <= li <= ri <= 100,并且给定m<=100条边,每条边为u,v,d表示xu< ...