心得

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

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

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. 832. Flipping an Image

    class Solution { public: vector<vector<int>> flipAndInvertImage(vector<vector<int& ...

  2. ASP项目部署IIS7.5中遇到的问题

    我们大家都熟悉了tomcat服务器的部署,如果是一个ASP项目如何部署呢.这也是我在客户现场遇到的问题.ASP项目一般是用的系统组件IIS来部署项目.下面我讲一下自己在部署过程中遇到的问题. 如果在网 ...

  3. auto和decltype(c++11)

    1.auto 1)auto是一个类型说明符(类型说明符就是像int.double这样的),用来定义一个变量,它可以让编译器去分析表达式的类型,并使用该表达式的值去初始化变量 //auto定义的变量必须 ...

  4. 安装完ubuntu后需要安装的软件

    ubuntu安装完sudo apt-get install vim g++ openssh-server libgl1-mesa-dev vmtools

  5. python的6种基本数据类型--字典

    python的6种基本数据类型--字典   字典 字典的定义与特性 字典是Python语言中唯一的映射类型. 定义:{key1:value1,key2:value2} 1.键与值用冒号":& ...

  6. Design Principle

    原文地址:面向对象设计模式原则详解 http://blog.csdn.net/hguisu/article/details/7571617 程序员必备的七大面向对象设计原则(一) http://www ...

  7. 20155326 实验四 Android程序设计实验报告

    20155326 实验四 Android程序设计实验报告 实验内容 1.基于Android Studio开发简单的Android应用并部署测试; 2.了解Android.组件.布局管理器的使用: 3. ...

  8. Scala_继承

    继承 Scala与Java在继承方面的区别 Scala中的继承与Java有着显著的不同: 重写一个非抽象方法必须使用override修饰符 只有主构造器可以调用超类的主构造器 在子类中重写超类的抽象方 ...

  9. SRM481

    250pt 题意:上帝知道一个“先有鸡还是先有蛋”的答案,上帝和N<=10^6个人说了答案,不过有x个人故意告诉了他们错误的答案,然后有一个人问了这N个人问题的答案,有M个人说先有鸡,N-M个人 ...

  10. SRM387 div1

    250pt: 题目:有一些盒子(不大于50个),每个盒子里有一些大理石(最多50种颜色),然后给定每个盒子里每种颜色大理石的个数(没有为0),求最少操作几步满足: 1:最多只能一个盒子里有多种颜色,叫 ...