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 的中文版, 为大家提供了多种不同的阅读方式. 中英文双语版- ...
随机推荐
- 【Android Developers Training】 98. 获取联系人列表
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- Gradle学习笔记之Groovy
[TOC] Gradle 的核心功能是由Java实现. 在这些功能之上, 有一个使用动态编程语言Groovy编写的领域特定语言(DSL). Gradle的构建脚本build.gradle和settin ...
- touchmover 手机端拖动方法
function drag(obj, parentNode) { var obj = document.getElementById(obj); if (arguments.length == 1) ...
- P2727 Stringsobits
01串 Stringsobits 题目背景 考虑排好序的N(N<=31)位二进制数. 题目描述 他们是排列好的,而且包含所有长度为N且这个二进制数中1的位数的个数小于等于L(L<=N)的数 ...
- 【前端】一步一步使用webpack+react+scss脚手架重构项目
前言 前几天做了一个项目:[node]记录项目的开始与完成——pipeline_kafka流式数据库管理项目:因为开发时间紧迫,浅略的使用了一下react,感觉这个ui库非常的符合我的口味,现在趁着有 ...
- 转载文章之提供给开发者 10 款最好的 Python IDE
Python 非常易学,强大的编程语言.Python 包括高效高级的数据结构,提供简单且高效的面向对象编程. Python 的学习过程少不了 IDE 或者代码编辑器,或者集成的开发编辑器(IDE).这 ...
- 网站waf检测
WAFW00F WAFW00F识别和指纹Web应用防火墙(WAF)产品. 其工作原理是首先通过发送一个正常http请求,然后观察其返回有没有一些特征字符,若没有在通过发送一个恶意的请求触发waf拦截来 ...
- JVM入门——运行时数据区
这张图我相信基本上对JVM有点接触的都应该很熟悉,可以说这是JVM入门的第一课.其中的“堆”和“虚拟机栈(栈)”更是耳熟能详.下面将围绕这张图对JVM的运行时数据区做一个简单介绍. 程序计数器(Pro ...
- [问题解决]linux sudo xxx:command not found
题外话 软件的安装在linux下主要分为两种.一种是通过包管理器例如ubuntu的apt-get xxx,另一种是自己手动安装.通过包管理器安装的,基本开箱即用,无需配置,但是存在一个问题,有时候无法 ...
- 简单的小程序实现ATM机操作
简单的小程序实现ATM机操作 代码如下: package Day06; import java.util.Scanner; public class TestAccount { public stat ...