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 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...
随机推荐
- vue-cli 脚手架 安装
一. node安装 1)如果不确定自己是否安装了node,可以在命令行工具内执行: node -v (检查一下 版本): 2)如果 执行结果显示: xx 不是内部命令,说明你还没有安装node , ...
- PHP中利用redis实现消息队列处理高并发请求
将请求存入redis 为了模拟多个用户的请求,使用一个for循环替代 //redis数据入队操作 $redis = new Redis(); $redis->connect('127.0.0.1 ...
- ci框架中表前缀的处理
后面的写死,前面的无论如何改变都没事,会自动的替换,以后如果数据库的表前缀被修改了,只需要修改上面的配置项,下面的不变
- [leetcode-541-Reverse String II]
Given a string and an integer k, you need to reverse the first k characters for every 2k characters ...
- example001点击隐藏
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 3.VBScript基础
1.VBS只有一种数据类型 ->Variant类似于泛类型,其中具体类型会在调用的时候具体化 2.声明变量可以用Dim语句,Public语句,Private语句 声明多个变量用逗号分隔 也可以隐 ...
- Android studio出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Reques的解决办法
最近更新了一下Android Studio,在导入新项目之后出现Error:Unable to tunnel through proxy. Proxy returns "HTTP/1.1 4 ...
- 多表链接 Left join
select * from( select U_User.LinkMan, SP_Approval.* ,SP_Approval_Msg.ApprovalUserID,ROW_NUMBER() ...
- python中json.loads,dumps,jsonify使用
search_info = {'id':132,'user_role':3} print type(search_info) #输出 <type 'dict'> #转为string用dum ...
- vijos1059题解
题目: XC的儿子小XC最喜欢玩的游戏用积木垒漂亮的城堡.城堡是用一些立方体的积木垒成的,城堡的每一层是一块积木.小XC是一个比他爸爸XC还聪明的孩子,他发现垒城堡的时候,如果下面的积木比上面的积木大 ...