思考的价值
  • README
  • Archives
    • 2022
      • 5-10
      • 4
      • 3
      • 1
      • 2
    • 2021
      • 12
      • 11
      • 10
      • 9
      • 8
      • 7
      • 6
      • 5
      • 4
        • 15-30
        • 1-14
      • 3
        • 1-18
        • 19-31
      • 2
        • 1-6
        • 7-17
        • 18-28
      • 1
        • 1-3
        • 4-7
        • 8-10
        • 11-15
        • 16-17
        • 18-23
        • 24-31
    • 2020
      • 12
        • 25-31
        • 17-24
        • 10
        • 9
        • 8
        • 7
        • 6
        • 5
        • 4
        • 3
        • 2
        • 1
        • 16
        • 15
        • 14
        • 12
      • 11
        • 21
        • 20
        • 30
        • 19
        • 29
        • 18
        • 28
        • 17
        • 27
        • 16
        • 26
        • 15
        • 25
        • 14
        • 24
        • 22
  • Tags
    • Talk
    • Information Theory
    • Web
      • Vue
      • Roadmap
      • CSS
      • React
      • Index
      • Webassembly
      • Redux
    • PL
      • Ruby
      • Lisp
      • Scala
      • OCaml
      • Python
      • Elm
      • PHP
      • JavaScript
      • Haskell
      • Go
      • CSharp
      • Shell
      • Index
      • Objective-C
      • C
      • TypeScript
      • Rust
      • SQL
      • Java
      • Kotlin
      • Fortran
    • Coding
    • Theory Of Computation
    • Service
    • Celebrity
    • Docs
      • ideavimrc
      • Dig deep into Hooks
    • Quality Assurance
    • Business
    • Network
    • Story
    • Psychology
    • Design
    • Joke
    • Node Deno
    • Security
    • Mobile
    • Podcast
    • Life
    • Game
    • Finance
    • Punchline
    • Product
    • Interview
    • Recruitment
    • Workplace
    • Environment
    • Idea
    • OS
    • Knowledge Management
    • Tool
      • Chrome
      • Command
      • Windows
      • Soft
      • Vim
      • Git
      • Terminal
      • JetBrainsIDE
      • VSCode
      • Mac
    • Database
    • Image
    • Hardware
    • OpenSource
    • Distributed
    • Algorithm
    • Architecture
    • Education
    • Book
    • English
    • Draft
  • Weekly
    • 🦤第 4 期 - 学习一门新的语言
    • 👹第 3 期 - 信息技术 与 人类的相似性
    • 👻第 2 期 - 鸭子理论与第一性原理
    • 🐱第 1 期 - 大厂垄断的 laas
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Tags
  2. PL

Shell

PreviousCSharpNextIndex

Last updated 4 years ago

Was this helpful?

  1. 书籍分享:

    introduction-to-bash-scripting

    书中介绍了 Shell 的基本语法特性,并用多个案例带你实战。

    虽然此书一共才122页,但内容很全面,由浅入深。值得阅读。

  2. 知识分享:

    chmod: 改变文件权限

    文件权限有两种设置方法,一种是数字权限,一种是符号权限。

    Linux 文件的基本权限就有九个,分别是 user/group/others(拥有者/组/其他) 三种身份各有自己的 read/write/execute 权限。

    1. 符号权限方式:

      chmod [-R] [u,g,o] [+,-,=] [文件或目录]

      -R: 目录下的所有文件都会变更

      user/group/others(拥有者/组/其他) 分别对应的缩写为 u,g,o

      + 代表增加权限,- 代表删除权限,=代表设置权限

      例:chmod u=rwx,g=rx,o=r 文件名

    2. 数字改变权限方式

      各权限的分数对照表

      • r:4

      • w:2

      • x:1

      rwx = 4 + 2 + 1 = 7

      wx = 2 + 1 = 3 rx = 4 + 1 = 5

      rw = 4 + 2 = 6

      chmod [-R] xyz 文件或目录

      -R: 目录下的所有文件都会变更

      xyz : 就是刚刚提到的数字类型的权限属性,为 rwx 属性数值的相加。

      例:chmod 777 .bashrc => -rwxrwxrwx

    3. 我就简单多了

    4. 快餐文分享:

      Defensive BASH Programming

      摘要: Here is my Katas for creating BASH programs that work. Nothing is new here, but from my experience pepole like to abuse BASH, forget computer science and create a from their programs. Here I provide methods to defend your programs from braking, and keep the code tidy and clean.

      由于 Shell 的糟糕设计, 作者提出了 防御性编程规范...

  3. Shell的魅力

    A: jq 不会是 jquery 吧。?

    B: 不是 Go写的 查询 json 的一个知名工具

  4. sudo=速冻 cd=吃的 ls=零食 ps=披萨 ssh=熟食 scp=水产品

  5. alias please=sudo

https://github.com/bobbyiliev/introduction-to-bash-scripting
https://kfirlavi.herokuapp.com/blog/2012/11/14/defensive-bash-programming/
Big ball of mud
image-20201202194044134
image-20201202194022778
image-20210206215911726