Prerequisite: Linux Command Line(I): Beginner

================================

File I/O

$ cat > a.txt  #create a file 'a.txt' and appends things into it

Type random stuff...

# press Ctrl+d to exit editting

$ cat a.txt

Type random stuff...

$ cat > a.txt  #'single >' for overwriting the entire document 

Overwritting in process...

#Ctrl+d

$ cat a.txt

Overwritting in process...

$ cat >> a.txt  #'double >>' for  appending to the EOF

appending in process...

#Ctrl+d

$ cat a.txt

Overwritting in process...

appending in process...

==================

Concatenating 2 txt files

cat a.txt b.txt > out.txt  #transfer the content of these 2 .txt and to a new .txt

cat a.txt b.txt > b.txt    #error! using 'cat <' input and output cannot be same

cat a.txt >> b.txt    #okay: content of a.txt appends to b.txt

==================

 Mkdir

Greedy method: >2 directories at a time

mkdir -p notebook/new

mkdir -p /notebook/new  #error!

mkdir -p friends/{John, Tom, Amy}  #with space, only 1 directory created

mkdir -p friends/{John,Tom,Amy}  #3 directories created

rm -r friends   #remove non-empty directories & itself

===================

cd

cd ..  # go up one directory

====================

output script into txt 

script out.txt

# type some commands

exit

====================

remove all files within a directory without removing the folder

rm Documents/*  #suppose we are at /root

===================

Linux Command Line(II): Intermediate的更多相关文章

  1. [笔记]The Linux command line

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

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

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

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

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

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

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

  5. Linux Command Line Basics

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

  6. Linux Command Line 解析

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

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

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

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

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

随机推荐

  1. Swift字符串插值

    字符串插值是一种全新的构建字符串的方式,可以在其中包含常量.变量.字面量和表达式.您插入的字符串字面量的每一项都被包裹在以反斜线为前缀的圆括号中: let multiplier = let messa ...

  2. 使用c#解析json库

    写了个c#版的json解析库,提供了json到hashtable以及hashtable到json字符串的转换 受惠于c#的语法特性,hashtable到json的解析变得非常简单 先判断传入的obje ...

  3. 编写运行最简单的java程序——使用记事本编写java程序

    第一个java程序--使用记事本编辑 经过上篇文章的java环境搭建成功的小伙伴们可以在自己的计算机上编写属于自己的java程序了yo~ 还没有搭建环境变量的小伙伴请转移到上一篇的随笔中去完成搭建. ...

  4. JavaScript中的栈及通过栈操作的实例

    <script> /*栈操作*/ function Stack() { this.dataStore = []; this.top = 0; this.push = push; this. ...

  5. Win10安裝weblogic12C

    一.系统环境 Win10系统 Jdk1.8 64位 二.安装Weblogic      第一步:用系统管理员身份打开CMD命令提示符,用CMD方式进入"fmw_12.1.3.0.0_wls. ...

  6. Tomcat学习笔记(一)一个简单的Web服务器

    内容为<深入剖析Tomcat>第一章重点,以及自己的总结,如有描述不清的,可查看原书. 一.HTTP协议: 1.定义:用于服务器与客户端的通讯的协议,允许web服务器和浏览器通过互联网进行 ...

  7. JFile的导入xlsx与xls

    首先需要有JAVA的一些jar包 下载地址:http://download.csdn.net/detail/qq_35980546/9892511 你要先配置好路由,还有能拿到绝对路径才行 下面直接给 ...

  8. C# 调用.exe文件

    process da = new process(); da.startinfo.filename = @""D:\BM0002\BM0002.exe";  //要调用的 ...

  9. 理解梯度下降法(Gradient Decent)

    1. 什么是梯度下降法?   梯度下降法(Gradient Decent)是一种常用的最优化方法,是求解无约束问题最古老也是最常用的方法之一.也被称之为最速下降法.梯度下降法在机器学习中十分常见,多用 ...

  10. select默认选中项颜色为灰色,选择后变为黑色(js实现)

    <script> var unSelected = "#999"; var selected = "#333"; $(function () { $ ...