Linux Command Line(II): Intermediate
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的更多相关文章
- [笔记]The Linux command line
Notes on The Linux Command Line (by W. E. Shotts Jr.) edited by Gopher 感觉博客园是不是搞了什么CSS在里头--在博客园显示效果挺 ...
- 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令
Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...
- 《The Linux Command Line》 读书笔记02 关于命令的命令
<The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...
- 《The Linux Command Line》 读书笔记01 基本命令介绍
<The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...
- Linux Command Line Basics
Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...
- Linux Command Line 解析
Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...
- 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 ...
- 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( ...
- Reso | The Linux Command Line 的中文版
http://book.haoduoshipin.com/tlcl/book/zh/ 本书是 The Linux Command Line 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...
随机推荐
- Vim练级笔记(持续更新)
漫漫练级路...作为一个VS重度依赖患者,又加上visual assist X 这种懒人必备的神级插件,转投vim门下,真是各种疼... vim用着用着就有拿鼠标去点的冲动,有木有啊! 不过经过一段时 ...
- java网络编程之socket
网络编程是什么 网络编程的本质是两个设备之间的数据交换,当然,在计算机网络中,设备主要指计算机.数据传递本身没有多大的难度,不就是把一个设备中的数据发送给两外一个设备,然后接受另外一个设备反馈的数据. ...
- C语言之复杂链表的复制(图示详解)
什么是复杂链表? 复杂链表指的是一个链表有若干个结点,每个结点有一个数据域用于存放数据,还有两个指针域,其中一个指向下一个节点,还有一个随机指向当前复杂链表中的任意一个节点或者是一个空结点.今天我们要 ...
- (转载)oracle 在一个存储过程中调用另一个返回游标的存储过程
原文链接:http://www.jb51.net/article/20160.htm 实际项目当中经常需要在一个存储过程中调用另一个存储过程返回的游标,本文列举了两种情况讲述具体的操作方法. 第一种情 ...
- JAXP Dom 案例 对xml文件进行增加 查找 删除
利用 JAXP 对 XML文件 的处理,把xml当做一个数据库来对待
- ASP.NET MVC HttpPostedFileBase文件上传
HttpPostedFileBase文件上传,支持多文件一次上传,如有图片,则支持略缩图保存 文件传输信息封装 /// <summary> /// 文件生成方式 /// </summ ...
- PHP+NGINX
1. 下载php编译包/nginx编译包(建议先装nginx再装php, php编译包我用的是5.5.35) 2. 创建好安装目录(我的编译包放在/home下) mkdir -p /usr/local ...
- docker~使用阿里加速器安centos
回到目录 上一篇说了hub.docker.com里拉个镜像太,而阿里云为我们做了不少本国镜像,这样下载的速度就很惊人了,下面看一下在centos7下配置阿里云加速器的方法 打开服务配置文件 vi /e ...
- 关于SpringMVC中如何把查询数据全转成String类型
之前,本想与客户商量做几张固定的报表予使用,结果发现客户每个月都需要各种各样的报表,所以我们做了个窗口用于直接执行SQL语句:数据量一开始并不是很大查询出来的数据较少(约1-6W左右),所以刚开始几个 ...
- 迭代器 Iterator
迭代器 Iterator 2016-5-7 可以这样说,迭代器统一了对容器的访问方式. 考虑这样的情景:原本是对着List编码,但是后来发现需要把相同的代码用于Set.我们需要一种不关心容器类型 而能 ...