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. 基于Java SE的模拟双色球彩票系统

    1.双色球规则: ①双色球分为红球和蓝球,红球选择的范围为1-33,而且红球选择6个数字:蓝球选择的范围为1-16,而且只能选择1个数字. ②选择方式为随机选择号码和手动输入选择号码. ③生成号码的顺 ...

  2. php5.6在yum下安装redis

    yum install redis php-redis --enablerepo=remi,remi-php56 设置redis开机自动启动,具体路径以实际为准, echo "/usr/bi ...

  3. mysql清除数据库中字符串空格方法

    update `z_lottery_list` set `win_number`=replace(`win_number`,' ','');

  4. Linux常用操作命令(三)

    查看linux日志某几行 用逆序显示命令tail查看 命令格式:tail [  -r ] [  -n Number ] [ File ] [一]从第3000行开始,显示1000行.即显示3000~39 ...

  5. PILLOW图片中加入中文 曲线救国Opencv

    索引 简述 准备 示例 效果图 结语 简述 我在使用opencv2或3的时候想要在图片上添加中文文字,需要去下载Freetype库,编译好链接到opencv库中才能中文的输出.网上大部分在图片中插入中 ...

  6. ExtJs2.0里Ext.form.Radio水平排列布局

      ExtJs2.0好像不支持单选框组,因此用两个name相同单选框来实现单选框组 var radio1 = new Ext.form.Radio({boxLabel:'男',name:'sex',i ...

  7. JFile的导入xlsx与xls

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

  8. cobbler简介+安装

    (介绍部分的内容部分是借鉴网上的非原创) 回顾pxe+kickstart PXE        PXE(preboot execute environment,预启动执行环境) PXE启动原理: 当计 ...

  9. 【Unity与23种设计模式】状态模式(State)

    定义: "让一个对象的行为随着内部状态的改变而变化,而该对象也像是换了类一样" 应用场景: 角色AI:控制角色在不同状态下的AI行为 服务器连接状态:开始连线.连线中.断线等状态 ...

  10. Java 用Freemarker完美导出word文档(带图片)

    Java  用Freemarker完美导出word文档(带图片) 前言 最近在项目中,因客户要求,将页面内容(如合同协议)导出成word,在网上翻了好多,感觉太乱了,不过最后还是较好解决了这个问题. ...