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. JavaScript 语言中的 this

    JavaScript 语言中的 this 由于其运行期绑定的特性,JavaScript 中的 this 含义要丰富得多,它可以是全局对象.当前对象或者任意对象,这完全取决于函数的调用方式.JavaSc ...

  2. (转载)WebSphere MQ安装过程

    参考文档: http://www.ibm.com/developerworks/cn/linux/linux-speed-start/l-ss-mq/

  3. php---tp框架---表单验证

    自动验证是ThinkPHP模型层提供的一种数据验证方法,可以在使用create创建数据对象的时候自动进行数据验证.分为静态验证和动态验证. 关于基础知识,请查看手册"自动验证"一章 ...

  4. linux可用更新源

    Kali 2.0更新源kali-rolling:#中科大deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contribde ...

  5. HDU 1728 逃离迷宫(DFS)

    题目网址:http://acm.hdu.edu.cn/showproblem.php?pid=1728 题目: 逃离迷宫 Time Limit: 1000/1000 MS (Java/Others)  ...

  6. java窗口按钮设置五个方向

    java窗口按钮设置五个方向 代码如下: package Day08; import java.awt.BorderLayout;import javax.swing.JButton;import j ...

  7. install.php文件建表时设置编码方式

    DROP TABLE IF EXISTS `".$db_prefix."adminlog`;CREATE TABLE `".$db_prefix."adminl ...

  8. [信息安全] 4.一次性密码 && 身份认证三要素

    [信息安全]系列博客:http://www.cnblogs.com/linianhui/category/985957.html 在信息安全领域,一般把Cryptography称为密码,而把Passw ...

  9. C#监控类属性的更改(大花猫动了哪些小玩具)

    C#监控类属性的更改(大花猫动了哪些小玩具) 实体类创建后在方法中对哪些属性赋值了,传递到底层方法时在底层如何得知哪些属性被赋值过.如何监控属性的更改,请看脑洞大开之<大花猫动了哪些小玩具> ...

  10. Spring事件解析

    首先介绍Spring事件相关类的关系: 其中EventListener与EventObject均是Java SE的范畴,源码如下: package java.util; public interfac ...