From 8b583b8fb7d99f01fdfeb847d69429b3c62c369b Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Thu, 3 Jan 2019 13:51:22 +0800 Subject: [PATCH 001/164] Translating An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 278 ++++++++++++++++++ 1 file changed, 278 insertions(+) create mode 100644 translated/tech/20181224 An Introduction to Go.md diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md new file mode 100644 index 0000000000..8963e7e016 --- /dev/null +++ b/translated/tech/20181224 An Introduction to Go.md @@ -0,0 +1,278 @@ +[#]: collector: (lujun9972) +[#]: translator: (LazyWolfLin) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (An Introduction to Go) +[#]: via: (https://blog.jak-linux.org/2018/12/24/introduction-to-go/) +[#]: author: (Julian Andres Klode https://blog.jak-linux.org/) + +Go 简介 +====== + +(以下内容是我的硕士论文的摘录,几乎整个 2.1 章节,向具有 CS 背景的人快速介绍 Go) + +Go 是一门用于并发编程的命令式编程语言,它主要由创造者 Google 进行开发,最初主要由 Robert Griesemer、Rob Pike 和 Ken Thompson开发。 Design of the language started in 2007, and an initial version was released in 2009; with the first stable version, 1.0 released in 2012 . + +Go has a C-like syntax (without a preprocessor), garbage collection, and, like its predecessors devloped at Bell Labs – Newsqueak (Rob Pike), Alef (Phil Winterbottom), and Inferno (Pike, Ritchie, et al.) – provides built-in support for concurrency using so-called goroutines and channels, a form of co-routines, based on the idea of Hoare’s ‘Communicating Sequential Processes’ . + +Go programs are organised in packages. A package is essentially a directory containing Go files. All files in a package share the same namespace, and there are two visibilities for symbols in a package: Symbols starting with an upper case character are visible to other packages, others are private to the package: + +``` +func PublicFunction() { + fmt.Println("Hello world") +} + +func privateFunction() { + fmt.Println("Hello package") +} +``` + +### 类型 + +Go has a fairly simple type system: There is no subtyping (but there are conversions), no generics, no polymorphic functions, and there are only a few basic categories of types: + + 1. base types: `int`, `int64`, `int8`, `uint`, `float32`, `float64`, etc. + + 2. `struct` + + 3. `interface` \- a set of methods + + 4. `map[K, V]` \- a map from a key type to a value type + + 5. `[number]Type` \- an array of some element type + + 6. `[]Type` \- a slice (pointer to array with length and capability) of some type + + 7. `chan Type` \- a thread-safe queue + + 8. pointer `*T` to some other type + + 9. functions + + 10. named type - aliases for other types that may have associated methods: + +``` +type T struct { foo int } +type T *T +type T OtherNamedType +``` + +Named types are mostly distinct from their underlying types, so you cannot assign them to each other, but some operators like `+` do work on objects of named types with an underlying numerical type (so you could add two `T` in the example above). + + +Maps, slices, and channels are reference-like types - they essentially are structs containing pointers. Other types are passed by value (copied), including arrays (which have a fixed length and are copied). + +#### 类型转换 + +Conversions are the similar to casts in C and other languages. They are written like this: + +``` +TypeName(value) +``` + +#### 常量 + +Go has “untyped” literals and constants. + +``` +1 // untyped integer literal +const foo = 1 // untyped integer constant +const foo int = 1 // int constant +``` + +Untyped values are classified into the following categories: `UntypedBool`, `UntypedInt`, `UntypedRune`, `UntypedFloat`, `UntypedComplex`, `UntypedString`, and `UntypedNil` (Go calls them basic kinds, other basic kinds are available for the concrete types like `uint8`). An untyped value can be assigned to a named type derived from a base type; for example: + +``` +type someType int + +const untyped = 2 // UntypedInt +const bar someType = untyped // OK: untyped can be assigned to someType +const typed int = 2 // int +const bar2 someType = typed // error: int cannot be assigned to someType +``` + +### 接口和对象 + +As mentioned before, interfaces are a set of methods. Go is not an object-oriented language per se, but it has some support for associating methods with named types: When declaring a function, a receiver can be provided - a receiver is an additional function argument that is passed before the function and involved in the function lookup, like this: + +``` +type SomeType struct { ... } + +func (s *SomeType) MyMethod() { +} + +func main() { + var s SomeType + s.MyMethod() +} +``` + +An object implements an interface if it implements all methods; for example, the following interface `MyMethoder` is implemented by `*SomeType` (note the pointer), and values of `*SomeType` can thus be used as values of `MyMethoder`. The most basic interface is `interface{}`, that is an interface with an empty method set - any object satisfies that interface. + +``` +type MyMethoder interface { + MyMethod() +} +``` + +There are some restrictions on valid receiver types; for example, while a named type could be a pointer (for example, `type MyIntPointer *int`), such a type is not a valid receiver type. + +### 控制流 + +Go provides three primary statements for control flow: `if`, `switch`, and `for`. The statements are fairly similar to their equivalent in other C-like languages, with some exceptions: + + * There are no parentheses around conditions, so it is `if a == b {}`, not `if (a == b) {}`. The braces are mandatory. + + * All of them can have initialisers, like this + +`if result, err := someFunction(); err == nil { // use result }` + + * The `switch` statement can use arbitrary expressions in cases + + * The `switch` statement can switch over nothing (equals switching over true) + + * Cases do not fall through by default (no `break` needed), use `fallthrough` at the end of a block to fall through. + + * The `for` loop can loop over ranges: `for key, val := range map { do something }` + + + + +### Goroutines + +The keyword `go` spawns a new goroutine, a concurrently executed function. It can be used with any function call, even a function literal: + +``` +func main() { + ... + go func() { + ... + }() + + go some_function(some_argument) +} +``` + +### Channels + +Goroutines are often combined with channels to provide an extended form of Communicating Sequential Processes . A channel is a concurrent-safe queue, and can be buffered or unbuffered: + +``` +var unbuffered = make(chan int) // sending blocks until value has been read +var buffered = make(chan int, 5) // may have up to 5 unread values queued +``` + +The `<-` operator is used to communicate with a single channel. + +``` +valueReadFromChannel := <- channel +otherChannel <- valueToSend +``` + +The `select` statement allows communication with multiple channels: + +``` +select { + case incoming := <- inboundChannel: + // A new message for me + case outgoingChannel <- outgoing: + // Could send a message, yay! +} +``` + +### `defer` 声明 + +Go provides a `defer` statement that allows a function call to be scheduled for execution when the function exits. It can be used for resource clean-up, for example: + +``` +func myFunc(someFile io.ReadCloser) { + defer someFile.close() + /bin /boot /dev /etc /home /lib /lib64 /lost+found /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var Do stuff with file */ +} +``` + +It is of course possible to use function literals as the function to call, and any variables can be used as usual when writing the call. + +### 错误处理 + +Go does not provide exceptions or structured error handling. Instead, it handles errors by returning them in a second or later return value: + +``` +func Read(p []byte) (n int, err error) + +// Built-in type: +type error interface { + Error() string +} +``` + +Errors have to be checked in the code, or can be assigned to `_`: + +``` +n0, _ := Read(Buffer) // ignore error +n, err := Read(buffer) +if err != nil { + return err +} +``` + +There are two functions to quickly unwind and recover the call stack, though: `panic()` and `recover()`. When `panic()` is called, the call stack is unwound, and any deferred functions are run as usual. When a deferred function invokes `recover()`, the unwinding stops, and the value given to `panic()` is returned. If we are unwinding normally and not due to a panic, `recover()` simply returns `nil`. In the example below, a function is deferred and any `error` value that is given to `panic()` will be recovered and stored in an error return value. Libraries sometimes use that approach to make highly recursive code like parsers more readable, while still maintaining the usual error return value for public functions. + +``` +func Function() (err error) { + defer func() { + s := recover() + switch s := s.(type) { // type switch + case error: + err = s // s has type error now + default: + panic(s) + } + } +} +``` + +### Arrays 和 slices + +As mentioned before, an array is a value type and a slice is a pointer into an array, created either by slicing an existing array or by using `make()` to create a slice, which will create an anonymous array to hold the elements. + +``` +slice1 := make([]int, 2, 5) // 5 elements allocated, 2 initialized to 0 +slice2 := array[:] // sliced entire array +slice3 := array[1:] // slice of array without first element +``` + +There are some more possible combinations for the slicing operator than mentioned above, but this should give a good first impression. + +A slice can be used as a dynamically growing array, using the `append()` function. + +``` +slice = append(slice, value1, value2) +slice = append(slice, arrayOrSlice...) +``` + +Slices are also used internally to represent variable parameters in variable length functions. + +### Maps + +Maps are simple key-value stores and support indexing and assigning. They are not thread-safe. + +``` +someValue := someMap[someKey] +someValue, ok := someMap[someKey] // ok is false if key not in someMap +someMap[someKey] = someValue +``` +-------------------------------------------------------------------------------- + +via: https://blog.jak-linux.org/2018/12/24/introduction-to-go/ + +作者:[Julian Andres Klode][a] +选题:[lujun9972][b] +译者:[LazyWolfLin](https://github.com/LazyWolfLin) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://blog.jak-linux.org/ +[b]: https://github.com/lujun9972 From 449d754782725f6b7b9f1321e6caba34f21c5ee9 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Mon, 7 Jan 2019 13:33:15 +0800 Subject: [PATCH 002/164] Translating An Introduction to Go. --- translated/tech/20181224 An Introduction to Go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 8963e7e016..e866c59da3 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -12,9 +12,9 @@ Go 简介 (以下内容是我的硕士论文的摘录,几乎整个 2.1 章节,向具有 CS 背景的人快速介绍 Go) -Go 是一门用于并发编程的命令式编程语言,它主要由创造者 Google 进行开发,最初主要由 Robert Griesemer、Rob Pike 和 Ken Thompson开发。 Design of the language started in 2007, and an initial version was released in 2009; with the first stable version, 1.0 released in 2012 . +Go 是一门用于并发编程的命令式编程语言,它主要由创造者 Google 进行开发,最初主要由 Robert Griesemer、Rob Pike 和 Ken Thompson开发。这门语言的设计起始于 2017 年,并在 2019 年推出最初版本;而第一个稳定版本是 2012 年发布的 1.0。 -Go has a C-like syntax (without a preprocessor), garbage collection, and, like its predecessors devloped at Bell Labs – Newsqueak (Rob Pike), Alef (Phil Winterbottom), and Inferno (Pike, Ritchie, et al.) – provides built-in support for concurrency using so-called goroutines and channels, a form of co-routines, based on the idea of Hoare’s ‘Communicating Sequential Processes’ . +Go 有 C 风格语法(没有预处理器),垃圾回收机制,并且类似它在贝尔实验室里被开发出来的前辈们,Newsqueak (Rob Pike)、Alef (Phil Winterbottom) 和 Inferno (Pike, Ritchie, et al.),使用所谓的 goroutines 和 channels(一种基于 Hoare 的“通信顺序进程”理论的协程)提供内建的并发支持。 Go programs are organised in packages. A package is essentially a directory containing Go files. All files in a package share the same namespace, and there are two visibilities for symbols in a package: Symbols starting with an upper case character are visible to other packages, others are private to the package: From 69a003aaa7e86cef8977875c92edf2aeb37e99ce Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Tue, 8 Jan 2019 13:32:56 +0800 Subject: [PATCH 003/164] Translating An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index e866c59da3..5edd8d3d19 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -14,9 +14,9 @@ Go 简介 Go 是一门用于并发编程的命令式编程语言,它主要由创造者 Google 进行开发,最初主要由 Robert Griesemer、Rob Pike 和 Ken Thompson开发。这门语言的设计起始于 2017 年,并在 2019 年推出最初版本;而第一个稳定版本是 2012 年发布的 1.0。 -Go 有 C 风格语法(没有预处理器),垃圾回收机制,并且类似它在贝尔实验室里被开发出来的前辈们,Newsqueak (Rob Pike)、Alef (Phil Winterbottom) 和 Inferno (Pike, Ritchie, et al.),使用所谓的 goroutines 和 channels(一种基于 Hoare 的“通信顺序进程”理论的协程)提供内建的并发支持。 +Go 有 C 风格语法(没有预处理器),垃圾回收机制,而且类似它在贝尔实验室里被开发出来的前辈们,Newsqueak (Rob Pike)、Alef (Phil Winterbottom) 和 Inferno (Pike, Ritchie, et al.),使用所谓的 goroutines 和 channels(一种基于 Hoare 的“通信顺序进程”理论的协程)提供内建的并发支持。 -Go programs are organised in packages. A package is essentially a directory containing Go files. All files in a package share the same namespace, and there are two visibilities for symbols in a package: Symbols starting with an upper case character are visible to other packages, others are private to the package: +Go 程序以包的形式组织。包本质是一个包含 Go 文件的文件夹。包内的所有文件共享相同的命名空间,而包内的符号有两种可见行:以大写字母开头的符号对于其他包是可见,而其他符号则是该包私有的: ``` func PublicFunction() { @@ -30,35 +30,35 @@ func privateFunction() { ### 类型 -Go has a fairly simple type system: There is no subtyping (but there are conversions), no generics, no polymorphic functions, and there are only a few basic categories of types: +Go 有一个相当简单的类型系统:没有子类型(但有类型转换),没有泛型,没有多态函数,只有一些基本的类型: - 1. base types: `int`, `int64`, `int8`, `uint`, `float32`, `float64`, etc. + 1. 基本类型:`int`、`int64`、`int8`、`uint`、`float32`、`float64` 等。 2. `struct` - 3. `interface` \- a set of methods + 3. `interface` \- 一类方法 - 4. `map[K, V]` \- a map from a key type to a value type + 4. `map[K, V]` \- 从键类型到值类型的映射 - 5. `[number]Type` \- an array of some element type + 5. `[number]Type` \- 一些元素类型组成的数组 - 6. `[]Type` \- a slice (pointer to array with length and capability) of some type + 6. `[]Type` \- 某种类型的切片(指向具有长度和功能的数组) - 7. `chan Type` \- a thread-safe queue + 7. `chan Type` \- 一个线程安全的队列 - 8. pointer `*T` to some other type + 8. 指针 `*T` 指向其他类型 - 9. functions + 9. 函数 - 10. named type - aliases for other types that may have associated methods: + 10. 命名类型 - 可能具有关联方法的其他类型的别名: -``` -type T struct { foo int } -type T *T -type T OtherNamedType -``` + ``` + type T struct { foo int } + type T *T + type T OtherNamedType + ``` -Named types are mostly distinct from their underlying types, so you cannot assign them to each other, but some operators like `+` do work on objects of named types with an underlying numerical type (so you could add two `T` in the example above). + Named types are mostly distinct from their underlying types, so you cannot assign them to each other, but some operators like `+` do work on objects of named types with an underlying numerical type (so you could add two `T` in the example above). Maps, slices, and channels are reference-like types - they essentially are structs containing pointers. Other types are passed by value (copied), including arrays (which have a fixed length and are copied). From 3f3c13273ef26c486129d97ba8407b89801df1e3 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Fri, 11 Jan 2019 09:58:30 +0800 Subject: [PATCH 004/164] Translating An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 5edd8d3d19..4f352a2bf0 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -50,7 +50,7 @@ Go 有一个相当简单的类型系统:没有子类型(但有类型转换 9. 函数 - 10. 命名类型 - 可能具有关联方法的其他类型的别名: + 10. 具名类型 - 可能具有关联方法的其他类型的别名(译者注:这里的别名并非指 Go 1.9 中的新特性“类型别名”): ``` type T struct { foo int } @@ -58,14 +58,13 @@ Go 有一个相当简单的类型系统:没有子类型(但有类型转换 type T OtherNamedType ``` - Named types are mostly distinct from their underlying types, so you cannot assign them to each other, but some operators like `+` do work on objects of named types with an underlying numerical type (so you could add two `T` in the example above). + 具名类型完全不同于他们的底层类型,所以你不能让他们互相赋值,但一些运输符,例如 `+`,能够处理同一底层数值类型的具名类型对象们(所以你可以在上面的示例中把两个 `T` 加起来)。 - -Maps, slices, and channels are reference-like types - they essentially are structs containing pointers. Other types are passed by value (copied), including arrays (which have a fixed length and are copied). +Maps、slices 和 channels 是类似于引用的类型——他们实际上是包含指针的结构。包括数组(具有固定长度并可被拷贝)在内的其他类型则是值(拷贝)传递。 #### 类型转换 -Conversions are the similar to casts in C and other languages. They are written like this: +类型转换类似于 C 或其他语言中的转换。它们写成这样子: ``` TypeName(value) @@ -73,23 +72,23 @@ TypeName(value) #### 常量 -Go has “untyped” literals and constants. +Go 有“无类型”字面量和常量。 ``` -1 // untyped integer literal -const foo = 1 // untyped integer constant -const foo int = 1 // int constant +1 // 无类型整数字面量 +const foo = 1 // 无类型整数常量 +const foo int = 1 // int 类型常量 ``` -Untyped values are classified into the following categories: `UntypedBool`, `UntypedInt`, `UntypedRune`, `UntypedFloat`, `UntypedComplex`, `UntypedString`, and `UntypedNil` (Go calls them basic kinds, other basic kinds are available for the concrete types like `uint8`). An untyped value can be assigned to a named type derived from a base type; for example: +无类型值可以分为以下几类:`UntypedBool`、`UntypedInt`、`UntypedRune`、`UntypedFloat`、`UntypedComplex`、`UntypedString` 以及 `UntypedNil`(Go 称它们为基础类型,other basic kinds are available for the concrete types like `uint8`)。一个无类型值可以赋值给一个从基础类型中派生的具名类型;例如: ``` type someType int const untyped = 2 // UntypedInt -const bar someType = untyped // OK: untyped can be assigned to someType +const bar someType = untyped // OK: untyped 可以被赋值给 someType const typed int = 2 // int -const bar2 someType = typed // error: int cannot be assigned to someType +const bar2 someType = typed // error: int 不能被赋值给 someType ``` ### 接口和对象 From 4ba64b24860ab5d07aef3f363444fdc7739f7f57 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Mon, 14 Jan 2019 17:15:45 +0800 Subject: [PATCH 005/164] Translating An Introduction to Go. --- translated/tech/20181224 An Introduction to Go.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 4f352a2bf0..a8b6fcf0c1 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -93,7 +93,7 @@ const bar2 someType = typed // error: int 不能被赋值给 someType ### 接口和对象 -As mentioned before, interfaces are a set of methods. Go is not an object-oriented language per se, but it has some support for associating methods with named types: When declaring a function, a receiver can be provided - a receiver is an additional function argument that is passed before the function and involved in the function lookup, like this: +正如上面所说的,接口是一组方法的集合。Go 本身不是一种面向对象的语言,但它支持将方法关联到命名类型上:当声明一个函数时,可以提供一个接收者。接收者是函数的一个额外参数,可以在函数之前传递并参与函数查找,就像这样: ``` type SomeType struct { ... } @@ -107,7 +107,7 @@ func main() { } ``` -An object implements an interface if it implements all methods; for example, the following interface `MyMethoder` is implemented by `*SomeType` (note the pointer), and values of `*SomeType` can thus be used as values of `MyMethoder`. The most basic interface is `interface{}`, that is an interface with an empty method set - any object satisfies that interface. +如果对象实现了所有方法,那么它就实现了接口;例如,`*SomeType`(注意指针)实现了下面的接口 `MyMethoder`,因此 `*SomeType` 类型的值就能作为 `MyMethoder` 类型的值使用。最基本的接口类型是 `interface{}`,它是一个带空方法集的接口——任何对象都满足该接口。 ``` type MyMethoder interface { @@ -115,7 +115,7 @@ type MyMethoder interface { } ``` -There are some restrictions on valid receiver types; for example, while a named type could be a pointer (for example, `type MyIntPointer *int`), such a type is not a valid receiver type. +合法的接收者类型是有些限制的;例如,命名类型可以是指针类型(例如,`type MyIntPointer *int`),但这种类型不是合法的接收者类型。 ### 控制流 From a42facff9180a09e3e72e20aa774e8b5466f9031 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Thu, 17 Jan 2019 13:29:16 +0800 Subject: [PATCH 006/164] Translating An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index a8b6fcf0c1..0f68678f14 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -119,24 +119,21 @@ type MyMethoder interface { ### 控制流 -Go provides three primary statements for control flow: `if`, `switch`, and `for`. The statements are fairly similar to their equivalent in other C-like languages, with some exceptions: +Go 提供了三个主要的控制了语句:`if`、`switch` 和 `for`。这些语句同其他 C 风格语言内的语句非常类似,但有一些不同: - * There are no parentheses around conditions, so it is `if a == b {}`, not `if (a == b) {}`. The braces are mandatory. + * 条件语句没有括号,所以条件语句是 `if a == b {}` 而不是 `if (a == b) {}`。大括号是必须的。 - * All of them can have initialisers, like this - -`if result, err := someFunction(); err == nil { // use result }` - - * The `switch` statement can use arbitrary expressions in cases - - * The `switch` statement can switch over nothing (equals switching over true) - - * Cases do not fall through by default (no `break` needed), use `fallthrough` at the end of a block to fall through. - - * The `for` loop can loop over ranges: `for key, val := range map { do something }` + * 所有的语句都可以有初始化,比如这个 + + `if result, err := someFunction(); err == nil { // use result }` + + * `switch` 语句在 cases 里可以使用任何表达式 + * `switch` 语句可以处理空的表达式(等于 true) + * 默认情况下,Go 不会从一个 case 进入下一个 case(不需要 `break`),在程序块的末尾使用 `fallthrough` 则会进入下一个 case。 + * 循环语句 `for` 不止能循环值域:`for key, val := range map { do something }` ### Goroutines From 835c314ae0433ee0d5c1f40c3563ad891963aefa Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Tue, 22 Jan 2019 13:52:56 +0800 Subject: [PATCH 007/164] Translating An Introduction to Go. --- translated/tech/20181224 An Introduction to Go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 0f68678f14..78766d9de6 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -137,7 +137,7 @@ Go 提供了三个主要的控制了语句:`if`、`switch` 和 `for`。这些 ### Goroutines -The keyword `go` spawns a new goroutine, a concurrently executed function. It can be used with any function call, even a function literal: +关键词 `go` 会产生一个新的 goroutine,一个可以并行执行的函数。它可以用于任何函数调用,甚至一个匿名函数: ``` func main() { @@ -150,7 +150,7 @@ func main() { } ``` -### Channels +### 信道 Goroutines are often combined with channels to provide an extended form of Communicating Sequential Processes . A channel is a concurrent-safe queue, and can be buffered or unbuffered: From 1ed8581086497e5ab482124ea633dd1f8f4bb4a1 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Thu, 24 Jan 2019 12:57:46 +0800 Subject: [PATCH 008/164] Translating An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 78766d9de6..a63bd98003 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -152,43 +152,43 @@ func main() { ### 信道 -Goroutines are often combined with channels to provide an extended form of Communicating Sequential Processes . A channel is a concurrent-safe queue, and can be buffered or unbuffered: +Goroutines 通常同信道结合以提供一种通信顺序进程的扩展。信道是一个并发安全的队列,而且可以缓冲或者不缓冲: ``` -var unbuffered = make(chan int) // sending blocks until value has been read -var buffered = make(chan int, 5) // may have up to 5 unread values queued +var unbuffered = make(chan int) // 直到数据被读取时完成数据块发送 +var buffered = make(chan int, 5) // 最多有 5 个未读取的数据块 ``` -The `<-` operator is used to communicate with a single channel. +运输符 `<-` 用于同单个信道通信。 ``` valueReadFromChannel := <- channel otherChannel <- valueToSend ``` -The `select` statement allows communication with multiple channels: +语句 `select` 允许多个信道进行通信: ``` select { case incoming := <- inboundChannel: - // A new message for me + // 一条新消息 case outgoingChannel <- outgoing: - // Could send a message, yay! + // 可以发送消息 } ``` ### `defer` 声明 -Go provides a `defer` statement that allows a function call to be scheduled for execution when the function exits. It can be used for resource clean-up, for example: +Go 提供语句 `defer` 允许函数退出时调用执行预定的函数。它可以用于资源释放,例如: ``` func myFunc(someFile io.ReadCloser) { defer someFile.close() - /bin /boot /dev /etc /home /lib /lib64 /lost+found /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var Do stuff with file */ + /* 文件相关操作 */ } ``` -It is of course possible to use function literals as the function to call, and any variables can be used as usual when writing the call. +当然,它允许使用匿名函数作为被调函数,而且编写被调函数时可以像平常一样使用任何变量。 ### 错误处理 From 23e2abf7ca94c12a35bd986b1fd7de7a736103e8 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Fri, 25 Jan 2019 13:31:04 +0800 Subject: [PATCH 009/164] Translating An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index a63bd98003..0c2758fe2f 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -192,21 +192,21 @@ func myFunc(someFile io.ReadCloser) { ### 错误处理 -Go does not provide exceptions or structured error handling. Instead, it handles errors by returning them in a second or later return value: +Go 没有提供异常类或者结构化的错误处理。然而,它通过第二个及后续的返回值来返回错误从而处理错误: ``` func Read(p []byte) (n int, err error) -// Built-in type: +// 内建类型: type error interface { Error() string } ``` -Errors have to be checked in the code, or can be assigned to `_`: +必须在代码中检查错误或者赋值给 `_`: ``` -n0, _ := Read(Buffer) // ignore error +n0, _ := Read(Buffer) // 忽略错误 n, err := Read(buffer) if err != nil { return err @@ -217,15 +217,15 @@ There are two functions to quickly unwind and recover the call stack, though: `p ``` func Function() (err error) { - defer func() { - s := recover() - switch s := s.(type) { // type switch - case error: - err = s // s has type error now - default: - panic(s) - } - } + defer func() { + s := recover() + switch s := s.(type) { // type switch + case error: + err = s // s has type error now + default: + panic(s) + } + } } ``` From d80a73c8f0ed441266d3df10c8819ff5575f251e Mon Sep 17 00:00:00 2001 From: ZmJ <35414361+zzzzzzmj@users.noreply.github.com> Date: Sat, 26 Jan 2019 22:12:57 +0800 Subject: [PATCH 010/164] Update 20150717 The History of Hello World.md --- sources/tech/20150717 The History of Hello World.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150717 The History of Hello World.md b/sources/tech/20150717 The History of Hello World.md index 9211e9f40f..a7891455ce 100644 --- a/sources/tech/20150717 The History of Hello World.md +++ b/sources/tech/20150717 The History of Hello World.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (zzzzzzmj) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d276b9732768c214d0fcef3c0e2326d37bc8ed6e Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 01:15:23 +0800 Subject: [PATCH 011/164] PRF:20180722 Dawn of the Microcomputer- The Altair 8800.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zhs852 翻译的很棒,我做了一遍校对,你看看有无修改补充。预计下周一发。 --- ...n of the Microcomputer- The Altair 8800.md | 77 +++++++++---------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/translated/talk/20180722 Dawn of the Microcomputer- The Altair 8800.md b/translated/talk/20180722 Dawn of the Microcomputer- The Altair 8800.md index d6ae8689bf..2ebac634ff 100644 --- a/translated/talk/20180722 Dawn of the Microcomputer- The Altair 8800.md +++ b/translated/talk/20180722 Dawn of the Microcomputer- The Altair 8800.md @@ -1,46 +1,47 @@ 微型计算机的始祖:Altair 8800 ====== -《大众电子》的订阅者是个复杂的群体,杂志编辑 Arthur Salsberg 不得不在 [1974 年 12 月刊][1] 中的前言部分指出这点。此前,杂志编辑组曾收到了对《如何搭建家庭媒体中心》文章的抱怨,称这篇文章激励了许多业余电视爱好者走出去,削弱了专业修理人员存在的必要性,这对许多人的电视造成了极大伤害。Salsberg 认为,这个担忧的产生可能是因为大家不清楚《大众电子》读者们的真实水平。他解释道,杂志内部调查的数据显示,52 % 的订阅者都是某方面的电子专家,并且其中的 150,000 人在最近 60 天之内都修过电视。此外,订阅者们平均在电子产品上花费了 470 美金(2018 年则是 3578 美金),并且他们有对万用表、真空管伏特计、电子管测试仪、晶体管测试仪、射频讯号产生器和示波器的需求。“《大众电子》的读者们并不全都是新手。”Salsberg 总结道。 -熟悉《大众电子》的人居然会质疑它的订阅者,这令我十分吃惊。不过最近 60 天我的确没修过电视。我的电脑对我来说就是一块铝,我甚至没把它拆开看过。1974 年 12 月的《大众电子》刊登的像《驻波比是什么以及如何处理它》和《对万用表的测试》之类的特色文章,甚至连广告都令人生畏。它们中有个看起来像某种立体声系统的东西大胆地写道“除了‘四通道单元(即内建的 SQ、RM 和 CD-4 解码接收器)’,没有任何音频设备是被期待的”。这也表明了《大众电子》的订阅者一定对电子有很多深入的了解。 +《大众电子Popular Electronics》的订阅者们是个复杂的群体,该杂志的编辑 Arthur Salsberg 不得不在 [1974 年 12 月刊][1] 中的前言部分指出这点。此前,杂志编辑组曾收到了对《如何搭建家庭媒体中心》文章的抱怨,称这篇文章激励了许多业余电视爱好者走出去,削弱了专业修理人员存在的必要性,这对许多人的电视造成了极大伤害。Salsberg 认为,这个担忧的产生可能是因为大家不清楚《大众电子》读者们的真实水平。他解释道,据杂志内部调查的数据显示,52% 的订阅者都是某方面的电子专家,并且其中的 150,000 人在最近 60 天之内都修过电视。此外,订阅者们平均在电子产品上花费了 470 美金(2018 年则是 3578 美金),并且他们拥有万用表、真空管伏特计、电子管测试仪、晶体管测试仪、射频讯号产生器和示波器等必要设备。“《大众电子》的读者们并不全都是新手。”Salsberg 总结道。 -不过在 [1975 年 1 月刊][2] 中,杂志为读者们带来了一些他们从没见过的东西。在标题“发现项目”下面,杂志的封面是一个黑灰色的盒子,它的前面板上有一组开关和灯。这便是 Altair 8800,“世界上首个有商业竞争力的迷你计算机”,它的售价低于 400 美元。尽管 Altair 作为“迷你计算机”被宣传,但其实大家都将它称为“微机”和PC,它是首个商业上成功的新型电脑。Altair 十分小巧而且很便宜,以至于它成为了当时家家户户都能用起的电脑。正如 Salsberg 所写道,它在《大众电子》上的出现意味着:“家用电脑的时代终于到来了。” +熟悉《大众电子》的人居然会质疑它的订阅者,这令我十分吃惊。不过最近 60 天我的确没修过电视。我的电脑对我来说就是一块铝,我甚至没把它拆开看过。1974 年 12 月的《大众电子》刊登的像《驻波比是什么以及如何处理它》和《对万用表的测试》之类的特色文章,甚至连广告都令人生畏。它们中有个看起来像某种立体声系统的东西大胆地写道“除了‘四通道单元(即内建的 SQ、RM 和 CD-4 解码接收器)’,没有任何音频设备是值得期待的”。这也表明了《大众电子》的订阅者一定对电子有很多深入的了解。 + +不过在 [1975 年 1 月刊][2] 中,该杂志为读者们带来了一些他们从没见过的东西。在标题“突破性项目”下面,杂志的封面是一个大大的黑灰色盒子,其前面板上有一组复杂开关和灯。这便是 Altair 8800,“世界上首个有商业竞争力的小型机”,它的售价低于 400 美元。尽管 Altair 被宣传作“小型机minicomputer”,但它实际上是首个商业上成功的新型计算机成员,它首先被称为“微型计算机microcomputers”,最终被称为 PC(个人计算机Personal Computer)。Altair 十分小巧而且很便宜,以至于它成为了当时家家户户都能用起的电脑。正如 Salsberg 所写道,它在《大众电子》上的出现意味着:“家用电脑的时代终于到来了。” ![《大众电子》1975 年 1 月刊的封面][3] -此前,我曾写过 [关于 Altair 的文章][4],但我觉得 Altair 有让我再次介绍的价值。它在当时性能并不强(虽然它便宜很多),也不是首个装载微处理器(由至少三个微处理器组成)的通用计算机。但是 Altair 是一种可供我们所有人使用的计算机。它是历史上包括我们所拥有的设备中首台流行的计算机,早于 Altair 计算机都是完全不同的机器,它们由穿孔卡编程并且很少与用户交互。不过 Altair 也是台极其简单的计算机,它不附带任何操作系统甚至引导加载器。除非你购买其它外设,否则 Altair 就是一台装配 RAM 并且只有一组开关和灯泡的机器。由于 Altair 操作简单,学习计算的基本理论都成了十分简单的事情,就好像他们在数字世界冒险时遇上了旧世界的居民一样。 +此前,我曾写过 [关于 Altair 的文章][4],但我觉得 Altair 值得重新审视。与当时其它的计算机相比,它并不是一台性能强劲的计算机(尽管它的成本要低得多),它也不是首个采用微处理器的通用计算机(在它之前已经至少有三个基于微处理器的计算机)。但是 Altair 是一种可供我们所有人使用的计算机。它是历史上我们所拥有的设备中首台流行的计算机,而早于 Altair 计算机都是完全不同的机器,那些大型机和笨重的迷你计算机由穿孔卡编程并且很少与之直接交互。不过 Altair 也是台极其简单的计算机,它没有附带任何操作系统甚至是引导程序。除非你为它购买外围设备,否则 Altair 就是一台装配了 RAM、前面板只有一组开关和灯泡的机器。由于 Altair 操作简单,使得重新理解基本的计算概念都成了十分简单的事情,正如模拟信号时代的人们第一次接触到数字设备一样。 ### Roberts 和他的公司 -Altair 被一家名为 MITS 的公司设计和制造,这家公司位于美国新墨西哥州的阿尔布开克。MITS 由一个叫 H. Edward Roberts 运营。他们起初借 19 世纪 70 年代的热潮制造模型火箭的遥测系统。集成电路将计算器的成本降低到十分可观的数字,突然之间它就成了美国教授们的必需品。不幸的是,由于计算器市场竞争过于激烈,到了 1974 年,MITS 便负债累累。 +Altair 是由一家名为微型仪器和遥测系统Micro Instrumentation and Telemetry Systems(MITS)的公司所设计制造,这家公司位于美国新墨西哥州的阿尔布开克。MITS 由一个叫 H. Edward Roberts 的人经营。在进入计算器市场之前,该公司已经开始制造模型火箭的遥测系统,该市场在 20 世纪 70 年代初期蓬勃发展。集成电路大大降低了计算器的成本,突然之间它就成了美国每个在职的专业人士的必需品。不幸的是,由于计算器市场竞争过于激烈,到了 1974 年初,MITS 便负债累累。 -1974 年在计算机界是奇迹迭出的一年annus mirabilis。一月的时候,惠普公司推出了世界首个可编程的手持计算器 HP-65。四月的时候,Intel 发布了 Intel 8080,他们的第二款 8 位微处理器,它也是首款受欢迎的微处理器。接着,六月的时候,《Radio Electronics》杂志介绍了 Mark-8 这个自制迷你计算机,它使用了 Intel 在 1972 年推出的 Intel 8008 微处理器。Mark-8 是使用微处理器搭建的第三台电脑,它的首次登场是在杂志的封面上。Mark-8 在《Radio Electronics》上的出现促使了《大众电子》寻找微机项目的出现。 +1974 年在计算机界是奇迹迭出的一年annus mirabilis。[^1] 一月的时候,惠普公司推出了世界首个可编程的手持计算器 HP-65。四月的时候,Intel 发布了 Intel 8080,这是他们的第二款 8 位微处理器,它也是首款广受欢迎的微处理器。接着,六月的时候,《无线电电子Radio Electronics》杂志宣传了一台名为 Mark-8 的自制小型计算机,它使用了 Intel 在 1972 年推出的 Intel 8008 微处理器。Mark-8 是有史以来使用微处理器搭建的第三台电脑,它的首次登场是在杂志的封面上。[^2] Mark-8 在《无线电电子》上的出现促使了《大众电子》寻找他们要自己宣传的小型机项目。 -《大众电子》的订阅者们其实早在 1974 年 12 月就通过电邮获得了 1975 年 1 月刊的副本。他们公布的 Altair 为这个奇迹迭出的一年annus mirabilis画上了圆满的句号。Altair 的出现是十分重要的,因为此前从未有过向公众提供的价格公道而又功能齐全的电脑。当时,作为最受欢迎的迷你计算机之一的 PDP-8 要几千美金才能买到。不过 Altair 搭载的 Intel 8080 芯片几乎能与 PDP-8 匹敌;8080 支持更广泛的指令集,而且 Altair 可以扩展到 64 kb 内存,显然强于仅有 4 kb 内存的 PDP-8。并且,Mark-8 也不是他的对手,因为它搭载的是只能处理 16 kb 内存的 Intel 8008。在 Mark-8 必须由用户按照说明书手动拼装的情况下,Altair 在购买时就已经被组装好了(不过由于后来 MITS 被大量订单淹没,最后真正能获得 Altair 的方式也只有买零件拼装了)。 +《大众电子》的订阅者们其实早在 1974 年 12 月就通过邮件获得了 1975 年 1 月刊的刊物。[^3] 所以 Altair 的宣布为这个奇迹迭出的一年annus mirabilis画上了圆满的句号。Altair 的出现是十分重要的,因为此前从未有过向公众提供的价格公道而又功能齐全的电脑。当时,作为最受欢迎的小型计算机之一的 PDP-8 要几千美金才能买到。然而作为 Altair 核心的 Intel 8080 芯片几乎能与 PDP-8 匹敌,甚至更强;8080 支持更广泛的指令集,而且 Altair 可以扩展到 64 kb 内存,显然强于仅有 4 kb 内存的 PDP-8。并且,Mark-8 也不是它的对手,因为它搭载的是只能处理 16 kb 内存的 Intel 8008。在 Mark-8 必须由用户按照说明书在印刷电路板上手动拼装的情况下,Altair 在购买时就已经被组装好了(不过由于后来 MITS 被大量订单淹没,最后真正能获得 Altair 的方式也只有买套件拼装了)。 -对许多《大众电子》的读者来说,Altair 是他们了解数字计算的起点。1975 年 1 月刊上那篇介绍 Altair 的文章由 Roberts 和 Altair 的联合设计师 William Yates 所写。Roberts 和 Yates 煞费苦心地用电工和无线电狂热者们所熟悉的词汇来介绍了数字硬件和计算机编程的基本概念。他们写道:“一台计算机其实由一堆可变的硬件构成。仅需修改储存于内存之中的为组合形式,便可改变硬件设备的种类。”同时,Roberts 和 Yates 认为编程的基本概念是“足够简单并能在较短时间内掌握,但是想要成为一个高效的程序员必须经验丰富且富有创造力。”对此我十分认同。尽管已经组装好了,文章仍包含了用来讲解 Intel 8080 的组成的详细图表。文章解释了 CPU 和计算机内存单元的区别,堆栈指针的概念和汇编语言以及更高级的语言(例如 FORTRAN 和 BASIC)比起手动输入机器码所带来的巨大优势。 +对许多《大众电子》的读者来说,Altair 是他们了解数字计算的起点。1975 年 1 月刊上那篇介绍 Altair 的文章由 Roberts 和 Altair 的共同设计师 William Yates 所写。Roberts 和 Yates 煞费苦心地用电工和无线电狂热者们所熟悉的词汇来介绍了数字硬件和计算机编程的基本概念。他们写道:“一台计算机其实由一块可变的硬件。仅需修改储存于内存之中的位组合形式,便可改变硬件设备的种类。”同时,Roberts 和 Yates 认为编程的基本概念是“足够简单并能在较短时间内掌握,但是想要成为一个高效的程序员必须经验丰富且富有创造力。”对此我十分认同。尽管该部分已经完全组装好了,文章仍包含了用来讲解 Intel 8080 的组成电路的详细图表。文章解释了 CPU 和计算机内存单元的区别,堆栈指针的用法,和汇编语言以及更高级的语言(例如 FORTRAN 和 BASIC)比起手动输入机器码所带来的巨大优势。 其实,《大众电子》在 1975 年 1 月刊之前就出版过 Roberts 撰写的系列文章。这一系列作为短期课程被收录在“数字逻辑”专栏中。在 1974 年 12 月刊中,Roberts 为读者们带来了关于构建“超低成本计算机终端”的文章,文章中介绍了可以用于 8 位电脑中输入值的八进制键盘。在介绍这个键盘时,Roberts 解释了晶体管到晶体管的逻辑工作原理,以及关于构建一种可以“记住”数字值的触发器的方法。Roberts 承诺说,这个键盘可以在下个月即将公布的 Altair 电脑中使用。 -有多少《大众电子》的读者制作了这个键盘我们无从得知,但是那个键盘的确是个很有用的东西。如果没有键盘和其它输入设备,我们只能通过拨动 Altair 面板上的开关来输入值。Altair 的面板上有 16 行开关被用来设置地址,而下方的 8 个则是用来操作计算机的。16 行中最右边的开关是用来指定要储存在内存中的值的。这么做不无道理,因为 Intel 8080 使用 16 位的值来处理 8 位的信息。而这 16 个开关每一个都代表了一个位,当开关向上时代表 1,向下则代表 0。用这样的方式交互是个启示(一会儿我们就会讲到),因为 Altair 的面板是真正的二进制界面。这使得你可以触摸到裸露的金属。 +有多少《大众电子》的读者制作了这个键盘我们无从得知,但是那个键盘的确是个很有用的东西。如果没有键盘和其它输入设备,我们只能通过拨动 Altair 面板上的开关来输入值。Altair 的前面板上有一行 16 个开关被用来设置地址,而下方的 8 个则是用来操作计算机的。一行 16 个开关中最右边的 8 个开关也能用来指定要储存在内存中的值。这么做不无道理,因为 Intel 8080 使用 16 位的值来寻址 8 位的字。而前面板的这 16 个开关每一个都代表了一个位,当开关向上时代表 1,向下则代表 0。用这样的方式与计算机交互是个启示(一会儿我们就会讲到),因为 Altair 的面板是真正的二进制界面。这使得你可以尽可能地接触到计算机实体。 -尽管在当下 Altair 的界面对我们来说完全不像是人用的,不过在那个时候这可是不平凡的。比如 PDP-8 的面板上有个类似的但更漂亮的二进制输入装置,而且它被涂上了吸引人的黄色和橙色,不过讲真,它应该重新来过。然而 PDP-8 经常与纸带阅读器或电传打字机配合使用,这使得程序输入更加容易。这些 I/O 设备价格高昂,这意味着 Altair 的用户们大都会被面板卡住。正如你所想,通过这一堆开关进入一个大型程序是个繁重的工作。不过幸运的是,Altair 可以与盒式记录器连接,这样一来载入程序就不是什么难事了。Bill Gates 和 Paul Allen 进行了微软的首次商业合作,为 Altair 编写了 BASIC 语言,并在 1975 年以 MITS 许可证发行。此后,那些买得起电传打字机的用户就能 [通过纸带来将 BASIC 载入 Altair][5] 了,并能使得用户能够通过字符界面与 Altair 交互。之后,BASIC 便成为了学生们最爱的入门编程语言,并成了早期微机时代的标准接口。 +尽管在当下 Altair 的界面对我们来说完全不像是人用的,不过在那个时代却并不罕见。比如 PDP-8 的面板上有个类似的但更漂亮的二进制输入装置,而且它被涂上了吸引人的黄色和橙色,不过讲真,它真的应该卷土重来。然而 PDP-8 经常与纸带阅读器或电传打字机配合使用,这使得程序输入更加容易。这些 I/O 设备价格高昂,这意味着 Altair 的用户们大都会被那个前面板拦住。正如你可能想象的那样,通过这一堆开关输入一个大型程序是个苦差事。不过幸运的是,Altair 可以与盒式记录器连接,这样一来载入程序就不是什么难事了。Bill Gates 和 Paul Allen 在 MITS 的授权下为 Altair 编写了一个 BASIC 语言版本,并在 1975 年中期发行,这成为了微软有史以来的首次商业尝试。此后,那些买得起电传打字机的用户就能 [通过纸带来将 BASIC 载入 Altair][5] 了,并能使得用户能够通过文字与 Altair 交互。之后,BASIC 便成为了学生们最爱的入门编程语言,并成了早期小型机时代的标准接口。 ### z80pack -多亏了网络上一些人,特别是 Udo Munk 的努力,你可以在你的电脑上运行 Altair 的模拟器。这个模拟器是在 Zilog Z80 CPU 的虚拟套件上构建的,这个 CPU 可以运行 Intel 8080 的软件。Altair 模拟器允许你像 Altair 的用户们一样调整面板上的开关。尽管点击这些开关的感觉不如拨动真实开关,但是使用 Altair 模拟器仍是一个能让你知道二进制人机交互效率有多低的途径,不过我觉得这同时也很简明直观。 +多亏了网络上一些人,特别是 Udo Munk 的努力,你可以在你的计算机上运行 Altair 的模拟器。这个模拟器是在 Zilog Z80 CPU 的虚拟套件上构建的,这个 CPU 可以运行 Intel 8080 的软件。Altair 模拟器允许你像 Altair 的早期用户们一样拨动前面板上的开关。尽管点击这些开关的感觉不如拨动真实开关的触觉,但是使用 Altair 模拟器仍是一个能让你感受二进制人机交互效率有多低的途径,至少在我看来这非常简明直观。 z80pack 是 Udo Munk 开发的 Z80 模拟器套件,你可以在 z80pack 的官网上找到它的下载链接。我在 [上一篇介绍 Altair 的文章中][4] 写到过在 macOS 上使用它的详细过程。如果你能编译 FrontPanel 库和 `altairsim` 可执行程序,你应该能直接运行 `altairsim` 并看到这个窗口: ![模拟器中的 Altair 面板][6] -在新版的 z80pack 中(比如我正在使用的 1.36 版本),你可以使用一个叫 Tarbell boot ROM 的功能,我觉得这是用来加载磁盘镜像的。经我测试,它的意思是你不能写入 RAM 中的前几个信息。在编辑 `/altairsim/conf/system.conf` 之后,你可以构建带有一个 16 页 RAM 且没有 ROM 或引导加载器的 Altair。除此之外,你还可以用这个配置文件来扩大运行模拟器的窗口,不得不说这还是挺方便的。 +在新版的 z80pack 中(比如我正在使用的 1.36 版本),你可以使用一个叫 Tarbell boot ROM 的功能,我觉得这是用来加载磁盘镜像的。经我测试,这意味着你不能写入到 RAM 中的前几个字。在编辑 `/altairsim/conf/system.conf` 之后,你可以构建带有一个 16 页 RAM 且没有 ROM 或引导加载器的 Altair。除此之外,你还可以用这个配置文件来扩大运行模拟器的窗口大小,不得不说这还是挺方便的。 -Altair 的面板看起来就很吓人,不过事实上并没有我们想象中的这么可怕。[Altair 说明书][7] 对解释开关和指示灯起到了很大的作用,这个 [YouTube 视频][8] 也是。若想运行一个简易的程序,你只需要了解一点点东西。Altair 右上方标签为 D0 到 D7 的指示灯代表当前处理地址的信息。标签为 A0 到 A15 的指示灯标识当前的地址。地址指示灯下的 16 个开关可以用来设置新地址;当 “EXAMINE” 开关被向上推动时,数据指示灯将会更新,并显示新地址上的内容。用这个功能,你便能观察到内存中所有的信息了。你也可以将 “EXAMINE” 推下来自动检查下一个位置上的信息,这使得检索信息更容易了。 +Altair 的面板看起来令人生畏,不过事实上并没有我们想象中的这么可怕。[Altair 说明书][7] 对解释开关和指示灯起到了很大的作用,这个 [YouTube 视频][8] 也是如此。若想输入和运行一个简易的程序,你只需要了解一点点东西。Altair 右上方标签为 D0 到 D7 的指示灯代表当前寻址的字的内容。标签为 A0 到 A15 的指示灯表示当前的地址。地址指示灯下的 16 个开关可以用来设置新地址;当 “EXAMINE” 开关被向上推动时,数据指示灯才会更新以显示新地址上的内容。用这个功能,你便能“观察”到内存中所有的信息了。你也可以将 “EXAMINE” 推下来“EXAMINE NEXT”位置,以自动检查下一个位置上的信息,这使得查看连续的信息更容易了。 -要将模式保存到信息中,请使用最左边的 8 个标签为 0 到 7 的开关。然后,请向上推动 “DEPOSIT” 按钮。 +要将位组合方式保存到内存信息中,请使用最右边的 8 个标签为 0 到 7 的开关。然后,请向上推动 “DEPOSIT” 按钮。 -在《大众电子》 的 [1975 年 2 月刊][9] 中,Roberts 和 Yates 制作了一小段程序来确保用户们的 Altair 正常工作。这个程序从内存中读取两个整型数据并添加之后将它们存回内存中。这个小程序仅由 6 条指令组成,但是这 6 条指令包含了 14 条在一起的内存信息,所以要正确地输入它们需要一点时间。这个程序也被写入了 Altair 的说明书,原文如下: +在《大众电子》 的 [1975 年 2 月刊][9] 中,Roberts 和 Yates 引导用户输入一小段程序来确保他们的 Altair 正常工作。这个程序从内存中读取两个整型数据并相加之后将和存回内存中。这个小程序仅由 6 条指令组成,但是这 6 条指令涉及了 14 个字的内存,所以要正确地输入它们需要一点时间。这个示例程序也被写入了 Altair 的说明书,原文如下: | Address | Mnemonic | Bit Pattern | Octal Equivalent | | :------: | :------: | :------: | :------: | @@ -59,18 +60,18 @@ Altair 的面板看起来就很吓人,不过事实上并没有我们想象中 | 12 | (address) | 00 000 000 | 0 0 0 | | 13 | (address) | 00 000 000 | 0 0 0 | -如果你通过开关来输入上面这些值,最终会得到一个程序,它会读取内存 128 中的值,并将其添加至 129 中,最终将其保存至 130 中。每条指令都会占用一个地址,它们最开始会被给予最低有效位,这便是第二个字节总会被清零(没有高于 255 的地址)的原因了。在输入这个程序并在 128 和 129 中输入了一些值之后,你可以向下推动 “RUN” ,之后再将它推到 “STOP” 位置。因为程序循环执行,以一秒内执行上千次的速度反复地添加并保存那些值。并且最后得到的值总是相同的,如果你暂停程序并检查 130,你应该能找到正确答案。 +如果你通过开关来将上表的这些值输入到 Altair,最终会得到一个程序,它会读取内存 128 中的值,并将其与 129 中的值相加,最终将其保存至 130 中。伴随每条取一个地址的指令的地址,它们最开始会给出最低有效位,这便是第二个字节总会被清零的原因了(没有高于 255 的地址)。在输入这个程序并在 128 和 129 中输入了一些值之后,你可以向下短暂推动 “RUN” ,之后再将它推到 “STOP” 位置。因为程序循环执行,以一秒内执行上千次的速度反复地添加并保存那些值。并且最后得到的值总是相同的,如果你停止该程序并查看 130 的内容,你应该能找到正确答案。 -我不知道普通的 Altair 用户是否使用过,不过 z80pack 包括了一个汇编程序 —— `z80asm`,意思是适用于 Z80 的汇编程序Z80 assembly,所以它使用了不同的助记符。不过因为 Z80 是被设计来适配为 Intel 8080 写的软件的,所以即使助记符不一样,它们的操作码也是相同的。你可以直接将 `z80asm` 装载进 Altair: +我不知道普通的 Altair 用户是否使用过汇编程序,不过 z80pack 包括了一个:`z80asm`,意思是适用于 Z80 的汇编程序Z80 assembly,所以它使用了一组不同的助记符。不过因为 Z80 是被设计来兼容为 Intel 8080 写的软件的,所以即使助记符不一样,它们的操作码也是相同的。你可以直接将 `z80asm` 汇编码装载进 Altair: ``` - ORG 0000H -START: LD A,(80H) ;Load from address 128. - LD B,A ;Move loaded value from accumulator (A) to reg B. - LD A,(81H) ;Load from address 129. - ADD A,B ;Add A and B. - LD (82H),A ;Store A at address 130. - JP START ;Jump to start. + ORG 0000H +START: LD A,(80H) ;Load from address 128. + LD B,A ;Move loaded value from accumulator (A) to reg B. + LD A,(81H) ;Load from address 129. + ADD A,B ;Add A and B. + LD (82H),A ;Store A at address 130. + JP START ;Jump to start. ``` 编译之后,你可以调用汇编程序来将其转换为 Intel HEX 文件: @@ -79,21 +80,21 @@ START: LD A,(80H) ;Load from address 128. $ ./z80asm -fh -oadd.hex add.asm ``` -我们用带有 `h` 参数的 `-f` 标识来定义输出的 HEX 文件。你可以用 `-x` 标识来传递 HEX 文件,从而使得 Altair 能够加载程序: +我们用带有 `h` 参数的 `-f` 标识来定义输出的 HEX 文件。你可以用 `-x` 标识来传递 HEX 文件,从而使得 Altair 能够加载该程序: ```shell $ ./altairsim -x add.hex ``` -这会在内存中自动设置前 14 个信息,就和你通过开关手动输入这些值一样。你可以直接使用 “RUN” 按钮来替代以前那些繁琐的步骤,这是如此的简单! +这会在内存中自动设置前 14 个字,就和你通过开关手动输入这些值一样。你可以直接使用 “RUN” 按钮来替代以前那些繁琐的步骤,这是如此的简单! -我不觉得有很多 Altair 用户以这种方式来编写软件。Altair BASIC 发布后,使得 BASIC 成为了 Altair 编程最简单的方法。z80pack 同时也包括了一些包含不同版本 Altair BASIC 的 HEX 文件;在模拟器中,你可以用这个方式加载 4.0 版本的 4K BASIC: +我不觉得有很多 Altair 用户以这种方式来编写软件。Altair BASIC 发布后,使得 BASIC 成为了 Altair 编程最简单的方法。z80pack 同时也包括了一些不同版本 Altair BASIC 的 HEX 文件;在模拟器中,你可以用这个方式加载 4.0 版本的 4K BASIC: ```shell $ ./altairsim -x basic4k40.hex ``` -当你开启模拟器并按下 “RUN” 按钮之后,你就会看到 BASIC 开始执行了,同时它会在终端中与你交互。它首先会提示你输入你内存的可用量,我们输入 4000 字节。随后,在显示 “OK” 提示符之前,它会问你几个问题,Gates 和 Allen 用这个来代替标准的 “READY” 并以此节省内存。在这之后,你便可以使用 BASIC 了: +当你开启模拟器并按下 “RUN” 按钮之后,你就会看到 BASIC 开始执行了,同时它会在终端中与你交互。它首先会提示你输入你的内存可用量,我们输入 4000 字节。随后,在显示 “OK” 提示符之前,它会问你几个问题,Gates 和 Allen 用这个“OK”来代替标准的 “READY” 并以此节省内存。在这之后,你便可以使用 BASIC 了: ``` OK @@ -101,26 +102,24 @@ PRINT 3 + 4 7 ``` -尽管只有极小的 4 kb 空间来运行 BASIC,不过你仍迈出了使用面板操控电脑的重要一步。 +虽然运行 BASIC 只有 4kb 的内存并没有给你足够的空间,但你可以看到它是如何从使用前面板迈出了重要的一步。 -很显然,Altair 远不及如今的家用电脑,并且比它晚十多年发布的 Mac 电脑看上去也是对 Altair 电脑的巨大飞跃。但是对亲手组装了 Altair 的《大众电子》的读者们来说,只用了低于 400 美金和一半的书柜空间的 Altair 才是第一个它们真正能拥有的全功能电脑。对那时只能用 [一叠卡片][10] 或一卷磁带来与计算机交互的人们来说,Altair 是个令人眼前一亮的玩意。这之后的微机基本都是在对 Altair 改进,使得它更易用。从某种意义上来说,我们甚至可以把它们看成更复杂的 Altair。Altair,一个野兽派的极简作品,却为之后的许多微机打下了铺垫。 +很显然,Altair 远不及如今的家用电脑和笔记本电脑,并且比它晚十多年发布的 Mac 电脑看上去也是对 这个简朴的 Altair 电脑的巨大飞跃。但是对第一批购买并亲手组装了 Altair 的《大众电子》的读者们来说,Altair 才是他们拥有的第一个真正的全功能电脑,而这一切只用了 400 美金低价和一半的书柜空间。对那时只能用 [一叠卡片][10] 或一卷磁带来与计算机交互的人们来说,Altair 是个令人眼前一亮的玩意。这之后的微型计算机基本都是在对 Altair 改进,使得它更易用。从某种意义上来说,它们只是更复杂的 Altair。Altair,一个野兽派的极简作品,却为之后的许多微型计算机打下了铺垫。 如果你觉得这篇文章写的不错,你可以在推特上关注 [@TwoBitHistory][11] 或订阅 [RSS feed][12] 来获得我们文章的更新提醒。文章每两周就会更新一次! -TwoBitHistory 的上一篇文章是………… - -> “跟我一起来进行这振奋人心的冒险吧!只需要十分钟,你就能了解到 10 年都没人用过的软件。” -> -> — TwoBitHistory (@TwoBitHistory) [写于 2018 年 7 月 7 日][13] +[^1]: Paul E. Ceruzzi, A History of Modern Computing (Cambridge, Mass: MIT Press, 2003), 226. +[^2]: “Mark-8 Minicomputer,” Byran’s Old Computers, accessed July 21, 2018, http://bytecollector.com/mark_8.htm. +[^3]: Paul E. Ceruzzi, A History of Modern Computing (Cambridge, Mass: MIT Press, 2003), 226. -------------------------------------------------------------------------------- via: https://twobithistory.org/2018/07/22/dawn-of-the-microcomputer.html -作者:[Two-Bit History][a] +作者:[Sinclair Target][a] 选题:[lujun9972][b] 译者:[zhs852](https://github.com/zhs852) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -129,13 +128,13 @@ via: https://twobithistory.org/2018/07/22/dawn-of-the-microcomputer.html [1]: https://www.americanradiohistory.com/Archive-Poptronics/70s/1974/Poptronics-1974-12.pdf [2]: https://www.americanradiohistory.com/Archive-Poptronics/70s/1975/Poptronics-1975-01.pdf [3]: https://twobithistory.org/images/jan1975-altair.jpg -[4]: https://twobithistory.org/2017/12/02/simulating-the-altair.html +[4]: https://linux.cn/article-10181-1.html [5]: https://www.youtube.com/watch?v=qv5b1Xowxdk [6]: https://www.autometer.de/unix4fun/z80pack/altair.png [7]: http://www.classiccmp.org/dunfield/altair/d/88opman.pdf [8]: https://www.youtube.com/watch?v=suyiMfzmZKs [9]: https://www.americanradiohistory.com/Archive-Poptronics/70s/1975/Poptronics-1975-02.pdf -[10]: https://twobithistory.org/2018/06/23/ibm-029-card-punch.html +[10]: https://linux.cn/article-10382-1.html [11]: https://twitter.com/TwoBitHistory [12]: https://twobithistory.org/feed.xml [13]: https://twitter.com/TwoBitHistory/status/1015647820353867776?ref_src=twsrc%5Etfw From ee5ee1cbc771973c5c36a48bff4a7f00d4c009b0 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 11:57:06 +0800 Subject: [PATCH 012/164] PRF:20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @MjSeven 这篇我做了比较大的调整,不是你的问题,是原文粗制滥造。 --- ...lexer For Heavy Command-Line Linux User.md | 144 +++++++++--------- 1 file changed, 71 insertions(+), 73 deletions(-) diff --git a/translated/tech/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md b/translated/tech/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md index dab7489ba4..a227f86d7d 100644 --- a/translated/tech/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md +++ b/translated/tech/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md @@ -1,20 +1,17 @@ -tmux - 适用于重度命令行 Linux 用户的强大终端复用器 +tmux:适用于重度命令行 Linux 用户的终端复用器 ====== -tmux 是终端复用的缩写,它允许用户在单个窗口中创建或启用多个终端(垂直或水平),当你处理不同的问题时,可以在单个窗口中轻松访问和控制。 +tmux 是终端复用器terminal multiplexer的缩写,它允许用户在单个窗口中创建或启用多个终端(垂直或水平),当你处理不同的问题时,可以在单个窗口中轻松访问和控制它们。 -它使用客户端-服务器模型,允许用户之间共享会话,也可以将终端连接到 tmux 会话。我们可以根据需要轻松移动或重新排列虚拟控制台。终端会话可以从一个虚拟控制台自由切换到另一个。 +它使用客户端-服务器模型,允许在用户之间共享会话,也可以将终端连接到 tmux 会话。我们可以根据需要轻松移动或重新排列虚拟控制台。终端会话可以从一个虚拟控制台自由切换到另一个。 - -tmux 依赖于 `libevent` 和 `ncurses` 库。tmux 在屏幕底部提供了一个状态行,它显示当前 tmux 会话的有关信息,例如当前窗口编号,窗口名称,用户名,主机名,当前时间和日期。 +tmux 依赖于 `libevent` 和 `ncurses` 库。tmux 在屏幕底部提供了一个状态行,它显示当前 tmux 会话的有关信息,例如当前窗口编号、窗口名称、用户名、主机名、当前时间和日期。 启动 tmux 时,它会在一个单独窗口上创建一个新的会话,并将其显示在屏幕上。它允许用户在同一个会话中创建任意数量的窗口。 -许多人说它相当于一块屏幕,但我不这么认为,因为它提供了许多配置选项。 +许多人说它类似于 `screen`,但我不这么认为,因为它提供了许多配置选项。 -**注意:** `Ctrl+b` 是 tmux 中的默认前缀,因此,要在 tmux 中执行任何操作,你必须先输入前缀然后输入所需的选项。 - -**建议阅读:** [适用于 Linux 的终端仿真器列表][1] +**注意:** `Ctrl+b` 是 tmux 中的默认命令前缀,因此,要在 tmux 中执行任何操作,你必须先输入该前缀然后输入所需的选项。 ### tmux 特性 @@ -26,34 +23,40 @@ tmux 依赖于 `libevent` 和 `ncurses` 库。tmux 在屏幕底部提供了一 * tmux 提供许多配置技巧 **建议阅读:** -**(#)** [tmate - 马上与其他人分享你的终端会话][2] -**(#)** [Teleconsole - 一个与其他人分享终端会话的工具][3] + +- [tmate - 马上与其他人分享你的终端会话][2] +- [Teleconsole - 一个与其他人分享终端会话的工具][3] ### 如何安装 tmux 命令 大多数 Linux 系统默认预安装 tmux 命令。如果没有,按照以下步骤安装。 -对于 **`Debian/Ubuntu`**,使用 [APT-GET 命令][4]或 [APT 命令][5]来安装: +对于 Debian/Ubuntu,使用 [APT-GET 命令][4]或 [APT 命令][5]来安装: + ``` $ sudo apt install tmux ``` -对于 **`RHEL/CentOS`**,使用 [YUM 命令][6]来安装: +对于 RHEL/CentOS,使用 [YUM 命令][6]来安装: + ``` $ sudo yum install tmux ``` -对于 **`Fedora`**,使用 [DNF 命令][7]来安装: +对于 Fedora,使用 [DNF 命令][7]来安装: + ``` $ sudo dnf install tmux ``` -对于 **`Arch Linux`**,使用 [Pacman 命令][8]来安装: +对于 Arch Linux,使用 [Pacman 命令][8]来安装: + ``` $ sudo pacman -S tmux ``` -对于 **`openSUSE`**,使用 [Zypper 命令][9]来安装: +对于 openSUSE,使用 [Zypper 命令][9]来安装: + ``` $ sudo zypper in tmux ``` @@ -61,56 +64,51 @@ $ sudo zypper in tmux ### 如何使用 tmux 在终端上运行以下命令来启动 tmux 会话。启动 tmux 后,它会在一个新窗口中创建新会话,并将使用你的用户账户自动登录到你的默认 shell。 + ``` $ tmux ``` ![][11] -你会得到类似于我们上面的截图。tmux 附带状态栏,显示有关当前会话详细信息,日期,时间等。 +你会得到类似于我们上面的截图。tmux 附带状态栏,显示有关当前会话详细信息、日期、时间等。 状态栏信息如下: - * **`0 :`** 它表示由 tmux 服务器创建的会话号。默认情况下,它从 0 开始。 - * **`0:username@host: :`** ) 0 表示会话号。用户名和主机名是当前的使用窗口的人。 - * **`~ :`** 它表示当前目录(我们在家目录中)。 - * **`* :`** 这表示窗口现在处于活动状态。 - * **`Hostname :`** 显示服务器的完全主机名。 - * **`Date& Time:`** 显示当前日期和时间。 + * `[0]`:它表示由 tmux 服务器创建的会话号。默认情况下,它从 0 开始。 + * `0:bash`:表示会话号、命令行提示符(这里的 `bash` 表示 shell 名称)。 + * `*`:这表示该窗口现在处于活动状态。 + * 主机名:显示服务器的完全主机名。 + * 日期与时间:显示当前日期和时间。 +(LCTT 译注:tmux 的状态可以根据需要定制,也会因环境、版本的不同而不同。) - ### 如何拆分窗口 +### 如何拆分窗口 - tmux 允许用户垂直或水平分割窗口。我们来看看如何做到这一点。 +tmux 允许用户垂直或水平分割窗口,称为窗格。每个窗格都包含自己独立运行的终端实例。我们来看看如何做到这一点。 + +按下 `Ctrl+b, %` 来垂直分割窗格。 -按下 `**(Ctrl+b), %**` 来垂直分割窗口。 ![][13] -Press `**(Ctrl+b), "**` 来水平分割窗口。 +按下 `Ctrl+b, "` 来水平分割窗格。 + ![][14] ### 如何在窗格之间移动 假设,我们创建了一些窗格,希望在它们之间移动,这该怎么做?如果你不知道怎么做,那么使用 tmux 就没有意义了。使用以下控制键执行操作。在窗格之间移动有许多方法。 +- 按 `Ctrl+b, ←` - 选择左边的窗格 +- 按 `Ctrl+b, →` - 选择右边的窗格 +- 按 `Ctrl+b, ↑` - 选择上边的窗格 +- 按 `Ctrl+b, ↓` - 选择下边的窗格 +- 按 `Ctrl+b, {` - 来向左交换窗格 +- 按 `Ctrl+b, }` - 来向右交换窗格 +- 按 `Ctrl+b, o` - 切换到下一个窗格(从左到右,从上到下) +- 按 `Ctrl+b, ;` - 移动到先前活动的窗格 -按 `(Ctrl+b), 左箭头` - 来向左移动 - -按 `(Ctrl+b), 右箭头` - 来向右移动 - -按 `(Ctrl+b), 上箭头` - 来向上移动 - -按 `(Ctrl+b), 下箭头` - 来向下移动 - -按 `(Ctrl+b), {` - 来向左移动 - -按 `(Ctrl+b), }` - 来向右移动 - -按 `(Ctrl+b), o` - 切换到下一个窗格(从左到右,从上到下) - -按 `(Ctrl+b), ;` - 移动到先前活动的窗格 - -出于测试目的,我们将在窗格之间移动。现在我们在 `pane2` 中,它 `lsb_release -a` 命令的输出。 +出于测试目的,我们将在窗格之间移动。现在我们在 `pane2` 中,它展示了 `lsb_release -a` 命令的输出。 ![][15] @@ -120,25 +118,23 @@ Press `**(Ctrl+b), "**` 来水平分割窗口。 ### 如何打开/创建新窗口 -你可以在一个终端内打开任意数量的窗口。终端窗口可以垂直和水平分割,称为 `panes`。每个窗格都包含自己独立运行的终端实例。 +你可以在一个终端内打开任意数量的窗口。 -按 `(Ctrl+b), c` 来创建一个新窗口。 +- 按 `Ctrl+b, c` 来创建一个新窗口。 +- 按 `Ctrl+b, n` 移动到下一个窗口。 +- 按 `Ctrl+b, p` 移动到上一个窗口。 +- 按 `Ctrl+b, 0` ~ `Ctrl+b, 9` 立即移动到特定窗口。 +- 按 `Ctrl+b, l` 移动到先前选择的窗口。 -按 `(Ctrl+b), n` 移动到下一个窗口 +我有两个窗口,第一个窗口有三个窗格,其中包含操作系统版本信息,`top` 命令输出和内核信息。 -按 `(Ctrl+b), p` 移动到上一个窗口。 - -按 `(Ctrl+b), (0-9)` 立即移动到特定窗口。 - -按 `(Ctrl+b), l` 移动到先前选择的窗口。 - -我有两个窗口,第一个窗口有三个窗格,其中包含操作系统版本信息,top 命令输出和内核信息。 ![][17] 第二个窗口有两个窗格,其中包含 Linux 发行版 logo 信息。使用以下命令执行操作: + ![][18] -按 `(Ctrl+b), w` 以交互方式选择当前窗口。 +按 `Ctrl+b, w` 以交互方式选择当前窗口。 ![][19] @@ -146,46 +142,48 @@ Press `**(Ctrl+b), "**` 来水平分割窗口。 你正在一些非常小的窗格中工作,并且你希望将其缩小以进行进一步的工作。要做到这一点,使用以下键绑定。 -目前我们有三个窗格,我在 `pane1` 工作,它使用 **Top** 命令显示系统活动信息,我将缩放它。 +目前我们有三个窗格,我在 `pane1` 工作,它使用 `top` 命令显示系统活动信息,我将缩放它。 + ![][17] 缩放窗格时,它将隐藏所有其它窗格,并只显示窗口中的缩放窗格。 ![][20] -按 `(Ctrl+b), z` 缩放窗格并再次按下它,使缩放窗格恢复原状。 +按 `Ctrl+b, z` 缩放窗格,并再次按下它使缩放窗格恢复原状。 ### 显示窗格信息 要了解窗格编号及其大小,运行以下命令。 -按 `(Ctrl+b), q` 可简单显示窗格索引。 +按 `Ctrl+b, q` 可简单显示窗格索引。 + ![][21] ### 显示窗口信息 -要知道窗口编号,布局大小,与窗口关联的窗格数量及其大小等,运行以下命令。 +要知道窗口编号、布局大小,与窗口关联的窗格数量及其大小等,运行以下命令。 只需运行 `tmux list-windows` 即可查看窗口信息。 + ![][22] ### 如何调整窗格大小 -你可能需要调整窗格大小来满足你的要求。你必须按下 `(Ctrl+b), :`,然后在页面底部的 `黄色(yellow)` 颜色条上输入以下详细信息。 +你可能需要调整窗格大小来满足你的要求。你必须按下 `Ctrl+b, :`,然后在页面底部的黄色颜色条上输入以下详细信息。 + ![][23] -在上一部分中,我们有打印了窗格索引,它同时也显示了窗格大小。为了测试,我们要向上增加 `10` 个单元。参考以下输出,该窗格将 pane1 和 pane2 的大小从 `55x21` 增加到 `55x31`。 +在上一部分中,我们打印了窗格索引,它同时也显示了窗格大小。为了测试,我们要向增加 `10` 个单元。参考以下输出,该窗格将 pane1 和 pane2 的大小从 `55x21` 增加到 `55x31`。 + ![][24] -**语法:** `(Ctrl+b), :` 然后输入 `resize-pane [options] [cells size]` +**语法:** `Ctrl+b, :` 然后输入 `resize-pane [options] [cells size]` -`(Ctrl+b), :` 然后输入 `resize-pane -D 10` 将当前窗格大小向下调整 10 个单元。 - -`(Ctrl+b), :` 然后输入 `resize-pane -U 10` 将当前窗格大小向上调整 10 个单元。 - -`(Ctrl+b), :` 然后输入 `resize-pane -L 10` 将当前窗格大小向左调整 10 个单元。 - -`(Ctrl+b), :` 然后输入 `resize-pane -R 10` 将当前窗格大小向右调整 10 个单元。 +- `Ctrl+b, :` 然后输入 `resize-pane -D 10` 将当前窗格大小向下调整 10 个单元。 +- `Ctrl+b, :` 然后输入 `resize-pane -U 10` 将当前窗格大小向上调整 10 个单元。 +- `Ctrl+b, :` 然后输入 `resize-pane -L 10` 将当前窗格大小向左调整 10 个单元。 +- `Ctrl+b, :` 然后输入 `resize-pane -R 10` 将当前窗格大小向右调整 10 个单元。 ### 分离并重新连接 tmux 会话 @@ -208,23 +206,23 @@ $ rsync -avzhe ssh /backup root@192.168.0.161:/backups/week-1/ ``` 运行以下命令以列出可用的 tmux 会话。 + ``` $ tmux ls 0: 3 windows (created Tue Jan 30 06:17:47 2018) [109x45] ``` 现在,使用适当的会话 ID 重新连接 tmux 会话,如下所示: + ``` $ tmux attach -t 0 ``` ### 如何关闭窗格和窗口 -只需在相应的窗格中输入 `exit` 或按下 `Ctrl-d` 即可关闭它,和终端关闭类似。要关闭窗口,按下 `(Ctrl+b), &`。 +只需在相应的窗格中输入 `exit` 或按下 `Ctrl-d` 即可关闭它,和终端关闭类似。要关闭窗口,按下 `Ctrl+b, &`。 好了,就到这里了,希望你喜欢上它。 -(to 校正:这句话是加的,感觉它结尾很突然,可以删掉。) - -------------------------------------------------------------------------------- @@ -232,7 +230,7 @@ via: https://www.2daygeek.com/tmux-a-powerful-terminal-multiplexer-emulator-for- 作者:[Magesh Maruthamuthu][a] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b99105f8ccfda057a970daa16793c952d6442408 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 11:57:47 +0800 Subject: [PATCH 013/164] PUB:20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md @MjSeven https://linux.cn/article-10480-1.html --- ...rful Terminal Multiplexer For Heavy Command-Line Linux User.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md (100%) diff --git a/translated/tech/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md b/published/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md similarity index 100% rename from translated/tech/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md rename to published/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md From 98e0f9e64e2dc20e3e042b6d989882a8d45af536 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 12:12:00 +0800 Subject: [PATCH 014/164] PRF:20180411 How To Setup Static File Server Instantly.md @MjSeven --- ...w To Setup Static File Server Instantly.md | 87 +++++++++++-------- 1 file changed, 51 insertions(+), 36 deletions(-) diff --git a/translated/tech/20180411 How To Setup Static File Server Instantly.md b/translated/tech/20180411 How To Setup Static File Server Instantly.md index 9f31dba91e..b0f4fd29b5 100644 --- a/translated/tech/20180411 How To Setup Static File Server Instantly.md +++ b/translated/tech/20180411 How To Setup Static File Server Instantly.md @@ -1,131 +1,146 @@ -如何设置一个即时静态文件服务器 +如何即时设置一个静态文件服务器 ====== ![](https://www.ostechnix.com/wp-content/uploads/2018/04/serve-720x340.png) -曾经想通过网络共享你的文件或项目,但不知道怎么做?别担心!这里有一个名为 **serve** 的简单实用程序,可以通过网络即时共享你的文件。这个简单的实用程序会立即将你的系统变成一个静态文件服务器,允许你通过网络提供文件。你可以从任何设备访问这些文件,而不用担心它们的操作系统是什么。你所需的只是一个 Web 浏览器。这个实用程序还可以用来服务静态网站。它以前称为 “list” 或 “micri-list”,但现在名称已改为 “serve”,这更适合这个实用程序的目的。 +曾经想通过网络共享你的文件或项目,但不知道怎么做?别担心!这里有一个名为 **serve** 的简单实用程序,可以通过网络即时共享你的文件。这个简单的实用程序会立即将你的系统变成一个静态文件服务器,允许你通过网络提供文件。你可以从任何设备访问这些文件,而不用担心它们的操作系统是什么。你所需的只是一个 Web 浏览器。这个实用程序还可以用来服务静态网站。它以前称为 “list” 或 “micri-list”,但现在名称已改为 “serve”(提供),这更适合这个实用程序的目的。 ### 使用 Serve 来设置一个静态文件服务器 -要安装 "serve",首先你需要安装 NodeJS 和 NPM。参考以下链接在 Linux 中安装 NodeJS 和 NPM。 +要安装 serve,首先你需要安装 NodeJS 和 NPM。参考以下链接在 Linux 中安装 NodeJS 和 NPM。 - * [如何在 Linux 上安装 NodeJS](https://www.ostechnix.com/install-node-js-linux/) +* [如何在 Linux 上安装 NodeJS](https://www.ostechnix.com/install-node-js-linux/) + +NodeJS 和 NPM 安装完成后,运行以下命令来安装 serve: -NodeJS 和 NPM 安装完成后,运行以下命令来安装 "serve": ``` $ npm install -g serve ``` 完成!现在是时候 serve 文件或文件夹了。 -使用 "serve" 的典型语法是: +使用 serve 的典型语法是: + ``` $ serve [options] ``` -### Serve 特定文件或文件夹 +### 提供特定文件或文件夹 + +例如,让我们共享 `Documents` 目录里的内容。为此,运行: -例如,让我们共享 **Documents** 目录里的内容。为此,运行: ``` $ serve Documents/ ``` 示例输出: + ![][2] 正如你在上图中看到的,给定目录的内容已通过两个 URL 提供网络支持。 -要从本地系统访问内容,你只需打开 Web 浏览器,输入 **** URL: +要从本地系统访问内容,你只需打开 Web 浏览器,输入 URL `http://localhost:5000/`: + ![][3] -Serve 实用程序以简单的布局显示给定目录的内容。你可以下载(右键单击文件并选择“将链接另存为...”)或只在浏览器中查看它们。 +serve 实用程序以简单的布局显示给定目录的内容。你可以下载(右键单击文件并选择“将链接另存为...”)或只在浏览器中查看它们。 + +如果想要在浏览器中自动打开本地地址,使用 `-o` 选项。 -如果想要在浏览器中自动打开本地地址,使用 **-o** 选项。 ``` $ serve -o Documents/ ``` -运行上述命令后,Serve 实用程序将自动打开 Web 浏览器并显示共享项的内容。 +运行上述命令后,serve 实用程序将自动打开 Web 浏览器并显示共享项的内容。 -同样,要通过网络从远程系统访问共享目录,可以在浏览器地址栏中输入 ****。用你系统的 IP 替换 192.168.43.192。 +同样,要通过网络从远程系统访问共享目录,可以在浏览器地址栏中输入 `http://192.168.43.192:5000`。用你系统的 IP 替换 192.168.43.192。 -**通过不同的端口 Serve 内容** +### 通过不同的端口提供内容 + +你可能已经注意到,默认情况下,serve 实用程序使用端口 5000。因此,确保防火墙或路由器中允许使用端口 5000。如果由于某种原因被阻止,你可以使用 `-p` 选项使用不同端口来提供内容。 -你可能已经注意到,默认情况下,serve 实用程序使用端口 **5000**。因此,确保防火墙或路由器中允许使用端口 5000。如果由于某种原因被阻止,你可以使用 **-p** 选项使用不同端口来提供内容。 ``` $ serve -p 1234 Documents/ ``` -上面的命令将通过端口 **1234** 提供 Documents 目录的内容。 +上面的命令将通过端口 1234 提供 `Documents` 目录的内容。 + ![][4] 要提供文件而不是文件夹,只需给它完整的路径,如下所示。 + ``` $ serve Documents/Papers/notes.txt ``` 只要知道路径,网络上的任何用户都可以访问共享目录的内容。 -**Serve 整个 $HOME 目录** +### 提供整个 `$HOME` 目录 打开终端输入 + ``` $ serve ``` -这将通过网络共享整个 $HOME 目录的内容。 +这将通过网络共享整个 `$HOME` 目录的内容。 -要停止共享,按下 **CTRL+C**。 +要停止共享,按下 `CTRL+C`。 -**Serve 选择的文件或文件夹** +### 提供选定的文件或文件夹 + +你可能不想共享所有文件或目录,只想共享其中的一些。你可以使用 `-i` 选项排除文件或目录。 -你可能不想共享所有文件或目录,只想共享其中的一些。你可以使用 **-i** 选项排除文件或目录。 ``` $ serve -i Downloads/ ``` -以上命令将 serve 整个文件系统,除了 **Downloads** 目录。 +以上命令将提供整个文件系统,除了 `Downloads` 目录。 -**仅在本地主机上提供内容** +### 仅在本地主机上提供内容 + +有时,你只想在本地系统而不是整个网络上提供内容。为此,使用 `-l` 标志,如下所示: -有时,你只想在本地系统而不是整个网络上 serve 内容。为此,使用 **-l** 标志,如下所示: ``` $ serve -l Documents/ ``` -此命令会仅在本地提供 **Documents** 目录。 +此命令会仅在本地提供 `Documents` 目录。 ![][5] 当你在共享服务器上工作时,这可能会很有用。系统中的所有用户都可以访问共享,但远程用户不能。 -**使用 SSL Serve 内容** +### 使用 SSL 提供内容 + +由于我们通过本地网络提供内容,因此我们不需要使用 SSL。但是,serve 实用程序可以使用 `-ssl` 选项来使用 SSL 共享内容。 -由于我们通过本地网络 serve 内容,因此我们不需要使用 SSL。但是,serve 实用程序可以使用 **-ssl** 选项来使用 SSL 共享内容。 ``` $ serve --ssl Documents/ ``` ![][6] -要通过 Web 浏览器访问共享,输入 “ 或 “. +要通过 Web 浏览器访问共享,输入 `https://localhost:5000` 或 `https://ip:5000`。 ![][7] -**通过身份验证 Serve 内容** +### 通过身份验证提供内容 -在上面的所以示例中,我们在没有任何身份验证的情况下 serve 内容,所以网络上的任何人都可以在没有任何身份验证的情况下访问共享内容。你可能会觉得应该使用用户名和密码访问某些内容。 +在上面的所有示例中,我们在没有任何身份验证的情况下提供内容,所以网络上的任何人都可以在没有任何身份验证的情况下访问共享内容。你可能会觉得应该使用用户名和密码访问某些内容。 为此,使用: + ``` $ SERVE_USER=ostechnix SERVE_PASSWORD=123456 serve --auth ``` -现在用户需要输入用户名(即 **ostechnix**)和密码(123456)来访问共享。(译者注:123456 是非常不好的密码,仅在实验情况下使用) +现在用户需要输入用户名(即 `ostechnix`)和密码(`123456`)来访问共享。(LCTT 译注:123456 是非常不好的密码,仅在实验情况下使用) ![][8] -Serve 实用程序还有一些其它功能,例如禁用 [**Gzip 压缩**][9],设置 **CORS** 头以允许来自任河源的请求,防止自动复制地址到剪贴板等。通过以下命令,你可以阅读完整的帮助部分。 +serve 实用程序还有一些其它功能,例如禁用 [Gzip 压缩][9],设置 CORS 头以允许来自任河源的请求,防止自动复制地址到剪贴板等。通过以下命令,你可以阅读完整的帮助部分。 + ``` $ serve help ``` @@ -134,18 +149,18 @@ $ serve help 共勉! -来源: +资源: - * [Serve GitHub 仓库](https://github.com/zeit/serve) +* [Serve GitHub 仓库](https://github.com/zeit/serve) -------------------------------------------------------------------------------- via: https://www.ostechnix.com/how-to-setup-static-file-server-instantly/ 作者:[SK][a] -译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) 选题:[lujun9972](https://github.com/lujun9972) +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 00e2b892160a54ca64b59beadfe183f1f8080c1e Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 13:48:51 +0800 Subject: [PATCH 015/164] PUB:20180411 How To Setup Static File Server Instantly.md @MjSeven https://linux.cn/article-10481-1.html --- .../20180411 How To Setup Static File Server Instantly.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180411 How To Setup Static File Server Instantly.md (100%) diff --git a/translated/tech/20180411 How To Setup Static File Server Instantly.md b/published/20180411 How To Setup Static File Server Instantly.md similarity index 100% rename from translated/tech/20180411 How To Setup Static File Server Instantly.md rename to published/20180411 How To Setup Static File Server Instantly.md From eeecde4bfb28fab43dc53adb1830963c8b653c72 Mon Sep 17 00:00:00 2001 From: qhwdw <33189910+qhwdw@users.noreply.github.com> Date: Sun, 27 Jan 2019 14:30:13 +0800 Subject: [PATCH 016/164] Translating by qhwdw --- ...0120203 Computer Laboratory - Raspberry Pi- Lesson 3 OK03.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20120203 Computer Laboratory - Raspberry Pi- Lesson 3 OK03.md b/sources/tech/20120203 Computer Laboratory - Raspberry Pi- Lesson 3 OK03.md index c6724ff672..9795a43296 100644 --- a/sources/tech/20120203 Computer Laboratory - Raspberry Pi- Lesson 3 OK03.md +++ b/sources/tech/20120203 Computer Laboratory - Raspberry Pi- Lesson 3 OK03.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (qhwdw) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From dc60fdd61bcf75932c68e16c61c9290e8150a5c6 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 17:21:00 +0800 Subject: [PATCH 017/164] APL:20190118 Top 5 Linux Server Distributions.md --- sources/tech/20190118 Top 5 Linux Server Distributions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190118 Top 5 Linux Server Distributions.md b/sources/tech/20190118 Top 5 Linux Server Distributions.md index 0cb6e83247..d9f2edf6d9 100644 --- a/sources/tech/20190118 Top 5 Linux Server Distributions.md +++ b/sources/tech/20190118 Top 5 Linux Server Distributions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b6af3c1bdf0bf07f16deb32f0f8b0c4553339d28 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 19:21:17 +0800 Subject: [PATCH 018/164] TSD:20190118 Top 5 Linux Server Distributions.md --- ...190118 Top 5 Linux Server Distributions.md | 264 ++++++------------ 1 file changed, 93 insertions(+), 171 deletions(-) diff --git a/sources/tech/20190118 Top 5 Linux Server Distributions.md b/sources/tech/20190118 Top 5 Linux Server Distributions.md index d9f2edf6d9..b263bb3b89 100644 --- a/sources/tech/20190118 Top 5 Linux Server Distributions.md +++ b/sources/tech/20190118 Top 5 Linux Server Distributions.md @@ -7,235 +7,157 @@ [#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) [#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) -Top 5 Linux Server Distributions +另一种 5 个顶级 Linux 服务器发行版 ====== + +> Jack Wallen 为 Linux 服务器发行版提供了一些可靠的选择,绝对值回票价。 + ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstor-main.jpg?itok=VNvfEIlf) -Ah, the age-old question: Which Linux distribution is best suited for servers? Typically, when this question is asked, the standard responses pop up: +啊,这个古老的问题:哪种 Linux 发行版最适合做服务器?通常,问这种问题时,所浮现出来的标准的答复就是: * RHEL - * SUSE - - * Ubuntu Server - + * Ubuntu 服务器 * Debian - * CentOS +然而,假如你将眼界放得更宽(不将服务器只看做是 IDC 托管的那种互联网服务器时),可能答案会有点不同。我准备稍微来点不同的。我想做出一个满足入选标准的发行版列表,这些发行版不仅是优秀的候选者,而且易于使用,可以为你的业务中的许多功能提供服务。在某些情况下,我选择的是一些替代品,可以取代其它需要一些工作才能达成要求的操作系统。 - - -However, in the name of opening your eyes to maybe something a bit different, I’m going to approach this a bit differently. I want to consider a list of possible distributions that are not only outstanding candidates but also easy to use, and that can serve many functions within your business. In some cases, my choices are drop-in replacements for other operating systems, whereas others require a bit of work to get them up to speed. - -Some of my choices are community editions of enterprise-grade servers, which could be considered gateways to purchasing a much more powerful platform. You’ll even find one or two entries here to be duty-specific platforms. Most importantly, however, what you’ll find on this list isn’t the usual fare. +我的一些选择是企业级服务器的社区版本,它们可以被视为购买更强大平台的入门级产品。你甚至可以在这里找到一两个作为特定任务平台的候选者。然而,最重要的是,你在此列表中找到的并非寻常的泛泛之辈。 ### ClearOS -What is ClearOS? For home and small business usage, you might not find a better solution. Out of the box, ClearOS includes tools like intrusion detection, a strong firewall, bandwidth management tools, a mail server, a domain controller, and much more. What makes ClearOS stand out above some of the competition is its purpose is to server as a simple Home and SOHO server with a user-friendly, graphical web-based interface. From that interface, you’ll find an application marketplace (Figure 1), with hundreds of apps (some of which are free, whereas some have an associated cost), that makes it incredibly easy to extend the ClearOS featureset. In other words, you make ClearOS the platform your home and small business needs it to be. Best of all, unlike many other alternatives, you only pay for the software and support you need. +什么是 ClearOS?对于家庭和小型企业用途,你可能找不到比它更好的解决方案。ClearOS 开箱即用,包括了入侵检测、强大的防火墙、带宽管理工具、邮件服务器、域控制器等工具。其目的是将服务器作为一个简单的家庭和 SOHO 服务器,并具有用户友好的基于 Web 的图形化界面,这使得 ClearOS 在某些评比中脱颖而出。从其界面中,你可以找到一个应用程序市场(图 1),其中包含数百个应用程序(其中一些是免费的,而另一些则具有相关费用),这使得扩展 ClearOS 功能集非常容易。换句话说,你可以将 ClearOS 作为你的家庭和小型企业所需的平台。最重要的是,与许多其他替代方案不同,你只需支付所需的软件和支持。 + ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/clearos.jpg?itok=knQkn5ch) -There are three different editions of ClearOS: - * [ClearOS Community][1] - the free edition of ClearOS +*图 1:ClearOS 应用程序市场* - * [ClearOS Home][2] - ideal for home offices +有三种版本的 ClearOS: - * [ClearOS Business][3] - ideal for small businesses, due to the inclusion of paid support + * [ClearOS Community][1] - 免费版 ClearOS + * [ClearOS Home][2] - 适于家庭办公 + * [ClearOS Business][3] - 适于小型企业,包括了付费支持。 +为了使软件安装更加容易,ClearOS 应用市场允许你通过以下方式进行选择软件: +   * 按功能(根据任务显示应用程序) +   * 按类别(显示相关应用程序组) +   * 快速选择文件(允许你按预先配置的模板选择,以帮助你快速启动和运行) +换句话说,如果你正在寻找 Linux 的家庭、SOHO 或 SMB 服务器,ClearOS 是一个出色的选择(特别是如果你没有启动和运行标准的 Linux 服务器的能力时)。 -To make the installation of software even easier, the ClearOS marketplace allows you to select via: +### Fedora 服务器 - * By Function (which displays apps according to task) +你肯定听说过 Fedora Linux。它是市场上最好的前沿发行版之一。但是你知道这个出色的 Fedora 桌面发行版的开发者们也开发了服务器版吗?Fedora 服务器平台是一个短生命周期的、社区支持的服务器操作系统。这使得经验丰富的、或对任何类型的 Linux(或任何操作系统)有经验的系统管理员,可以使用开源社区中提供的最新技术。在这段描述中有三个关键词: - * By Category (which displays groups of related apps) + * 经验丰富 + * 系统 + * 管理员 - * Quick Select File (which allows you to select pre-configured templates to get you up and running fast) - - - - -In other words, if you’re looking for a Linux Home, SOHO, or SMB server, ClearOS is an outstanding choice (especially if you don’t have the Linux chops to get a standard server up and running). - -### Fedora Server - -You’ve heard of Fedora Linux. Of course you have. It’s one of the finest bleeding edge distributions on the market. But did you know the developers of that excellent Fedora Desktop distribution also has a Server edition? The Fedora Server platform is a short-lifecycle, community-supported server OS. This take on the server operating system enables seasoned system administrators, experienced with any flavor of Linux (or any OS at all), to make use of the very latest technologies available in the open source community. There are three key words in that description: - - * Seasoned - - * System - - * Administrators - - - - -In other words, new users need not apply. Although Fedora Server is quite capable of handling any task you throw at it, it’s going to require someone with a bit more Linux kung fu to make it work and work well. One very nice inclusion with Fedora Server is that, out of the box, it includes one of the finest open source, web-based interface for servers on the market. With Cockpit (Figure 2) you get a quick glance at system resources, logs, storage, network, as well as the ability to manage accounts, services, applications, and updates. +换言之,新用户就不要考虑了。虽然 Fedora 服务器完全能够处理你抛出的任何任务,但它需要一些拥有更多的 Linux 功夫的人来使它工作并且运行良好。Fedora 服务器非常好的一点是,开箱即用,它包括了市场上用于服务器的开源的基于 Web 的最好的界面之一。通过 Cockpit(图 2),你可以快速浏览系统资源、日志、存储、网络以及拥有管理帐户、服务、应用程序和更新的能力。 ![Fedora Server][5] -Figure 2: Cockpit running on Fedora Server. +*图 2:运行在 Fedora 服务器上的 Cockpit* -[Used with permission][6] - -If you’re okay working with bleeding edge software, and want an outstanding admin dashboard, Fedora Server might be the platform for you. +如果你可以使用最前沿的软件,并想要一个出色的管理仪表板,Fedora 服务器可能就是你要的平台。 ### NethServer -NethServer is about as no-brainer of a drop-in SMB Linux server as you’ll find. With the latest iteration of NethServer, your small business will enjoy: +正如你所发现的那样,NethServer 是每个人都知道的简单 SMB Linux 服务器。通过 NethServer 的最新版本,你的小型企业将得到: - * Built-in Samba Active Directory Controller + * 内置 Samba 活动目录控制器 +   * 与 Nextcloud 的无缝集成 +   * 证书管理 +   * HTTPS 透明代理 +   * 防火墙 +   * 邮件服务器和过滤器 +   * Web 服务器和过滤器 +   * 群件 +   * IPS / IDS 或 VPN - * Seamless Nextcloud integration - - * Certificate management - - * Transparent HTTPS proxy - - * Firewall - - * Mail server and filter - - * Web server and filter - - * Groupware - - * IPS/IDS or VPN - - - - -All of the included features can be easily configured with a user-friendly, web-based interface that includes single-click installation of modules to expand the NethServer feature set (Figure 3) What sets NethServer apart from ClearOS is that it was designed to make the admin job easier. In other words, this platform offers much more in the way of flexibility and power. Unlike ClearOS, which is geared more toward home office and SOHO deployments, NethServer is equally at home in small business environments. +所有包含的功能都可以通过用户友好的基于 Web 的界面轻松配置,包括单击安装模块以扩展 NethServer 功能集(图 3)。NethServer 与 ClearOS 的区别在于它的设计目的是使管理工作更轻松。换句话说,这个平台提供了更多的灵活性和功能。与面向家庭办公室和 SOHO 部署的 ClearOS 不同,NethServer 在小型商业环境中用起来就像在家庭里使用一样方便。 ![NethServer][8] -Figure 3: Adding modules to NethServer. - -[Used with permission][6] +*图 3:给 NethServer 添加模块* ### Rockstor -Rockstor is a Linux and Btfrs powered advanced Network Attached Storage (NAS) and Cloud storage server that can be deployed for Home, SOHO, as well as small- and mid-sized businesses alike. With Rockstor, you get a full-blown NAS/Cloud solution with a user-friendly, web-based GUI tool that is just as easy for admins to set up as it is for users to use. Once you have Rockstor deployed, you can create pools, shares, snapshots, manage replication and users, share files (with the help of Samba, NFS, SFTP, and AFP), and even extend the featureset, thanks to add-ons (called Rock-ons). The list of Rock-ons includes: +Rockstor 是采用 Linux 和 Btfrs 的高级网络附加存储(NAS)和云存储服务器,可部署用于家庭、SOHO 以及中小型企业。借助 Rockstor,你可以获得一个完整的 NAS /云解决方案,其中包含一个用户友好的基于 Web 的 GUI 工具,管理员可以像普通用户一样轻松使用它来设置。一旦部署好了 Rockstor,你就可以创建存储池、共享、快照、管理复制和用户、共享文件(借助 Samba、NFS、SFTP 和 AFP),甚至扩展它的功能集,这要归功于附加组件(称为 Rock-ons)。Rock-ons 列表包括: - * CouchPotato (Downloader for usenet and bittorrent users) + * CouchPotato(Usenet 和 BitTorrent 用户的下载器) + * Deluge(BitTorrent 用户的电影下载器) + * EmbyServer(Emby 媒体服务器) + * Ghost(专业博主的发布平台) + * GitLab CE(Git 仓库托管和协作) + * Gogs Go Git Service(轻量级 Git 版本控制服务器和前端) + * Headphones(NZB 和 Torrent 的音乐自动下载器) + * 用于 Squeezebox 设备的罗技 Squeezebox 服务器 + * MariaDB(关系型数据管理系统) + * NZBGet(高效的 usenet 下载器) + * OwnCloud-Official(安全的文件共享和托管) + * Plexpy(基于 Python 的 Plex 用量跟踪器) + * Rocket.Chat(开源聊天平台) + * SaBnzbd(Usenet 下载器) + * Sickbeard(用于电视节目的互联网个人视频录像机) + * Sickrage(电视节目的自动视频库管理器) + * Sonarr(Usenet 和 BitTorrent 用户的个人视频录像机) + * Symform(备份设备) - * Deluge (Movie downloader for bittorrent users) - - * EmbyServer (Emby media server) - - * Ghost (Publishing platform for professional bloggers) - - * GitLab CE (Git repository hosting and collaboration) - - * Gogs Go Git Service (Lightweight Git version control server and front end) - - * Headphones (An automated music downloader for NZB and Torrent) - - * Logitech Squeezebox Server for Squeezebox Devices - - * MariaDB (Relational database management system) - - * NZBGet (Efficient usenet downloader) - - * OwnCloud-Official (Secure file sharing and hosting) - - * Plexpy (Python-based Plex Usage tracker) - - * Rocket.Chat (Open Source Chat Platform) - - * SaBnzbd (Usenet downloader) - - * Sickbeard (Internet PVR for TV shows) - - * Sickrage (Automatic Video Library Manager for TV Shows) - - * Sonarr (PVR for usenet and bittorrent users) - - * Symform (Backup service) - - - - -Rockstor also includes an at-a-glance dashboard that gives admins quick access to all the information they need about their server (Figure 4). +Rockstor 还包括了一目了然的仪表板,使管理员可以快速访问他们所需的有关其服务器的所有信息(图 4)。 ![Rockstor][10] -The Rockstor dashboard in action. - -[Used with permission][6] +*图 4: Rockstor 面板* ### Zentyal -Zentyal is another Small Business Server that does a great job of handling multiple tasks. If you’re looking for a Linux distribution that can handle the likes of: - - * Directory and Domain server - - * Mail server - - * Gateway - - * DHCP, DNS, and NTP server - - * Certification Authority +Zentyal 是另一个小型企业服务器,可以很好地处理多个任务。如果你正在寻找可以处理以下内容的 Linux 发行版: + * 目录和域服务器 + * 邮件服务器 + * 网关 + * DHCP、DNS 和 NTP 服务器 + * 认证机构(CA) * VPN + * 实时消息(IM) + * FTP 服务器 + * 反病毒 + * SSO 认证 + * 文件共享 + * RADIUS 认证 + * 虚拟化管理 + * 等等 - * Instant Messaging - - * FTP server - - * Antivirus - - * SSO authentication - - * File sharing - - * RADIUS - - * Virtualization Management - - * And more - - - - -Zentyal might be your new go-to. Zentyal has been around since 2004 and is based on Ubuntu Server, so it enjoys a rock-solid base and plenty of applications. And with the help of the Zentyal dashboard (Figure 5), admins can easily manage: - - * System - - * Network - - * Logs - - * Software updates and installation - - * Users/groups - - * Domains - - * File sharing - - * Mail +Zentyal 可能是你的新选择。从 2004 年 Zentyal 就存在了,它基于 Ubuntu Server,因此它拥有坚实的基础和丰富的应用程序。在 Zentyal 仪表板的帮助下(图 5),管理员可以轻松管理: + * 系统 + * 网络 + * 日志 + * 软件更新和安装 + * 用户/组 + * 域 + * 文件共享 + * 邮件 * DNS - - * Firewall - - * Certificates - - * And much more + * 防火墙 + * 证书 + * 等等 ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/zentyal.jpg?itok=Un9lpgh6) +*图 5:Zentyal 仪表板* -Adding new components to the Zentyal server is as simple as opening the Dashboard, clicking on Software Management > Zentyal Components, selecting what you want to add, and clicking Install. The one issue you might find with Zentyal is that it doesn’t offer nearly the amount of addons as you’ll find in the likes of Nethserver and ClearOS. But the services it does offer, Zentyal does incredibly well. +向 Zentyal 服务器添加新组件只需要打开仪表板,单击“软件管理” -> “Zentyal 组件”,选择要添加的组件,然后单击安装。Zentyal 可能会遇到的一个问题是,它提供不了与 Nethserver 和 ClearOS 一样多的插件。但它提供的服务,则做得非常好。 -### Plenty More Where These Came From +### 更多来自于 -This list of Linux servers is clearly not exhaustive. What it is, however, is a unique look at the top five server distributions you’ve probably not heard of. Of course, if you’d rather opt to use a more traditional Linux server distribution, you can always stick with [CentOS][11], [Ubuntu Server][12], [SUSE][13], [Red Hat Enterprise Linux][14], or [Debian][15]… most of which are found on every list of best server distributions on the market. If, however, you’re looking for something a bit different, give one of these five distos a try. +这个 Linux 服务器列表显然不是详尽无遗的。然而,这是一种对你可能没有听说过的五大服务器发行版的独特视角。当然,如果你更愿意使用更传统的 Linux 服务器发行版,你可以随时坚持使用 [CentOS][11]、[Ubuntu 服务器][12]、[SUSE][13]、[RHEL][14] 或 [Debian][15]……它们大多都出现在市场上最好的服务器发行版列表中。但是,如果你正在寻找一些不同的东西,那么试试这五个发行版中的一个。 -Learn more about Linux through the free ["Introduction to Linux" ][16]course from The Linux Foundation and edX. +通过 Linux 基金会和 edX 的免费[“Linux 简介”][16]课程了解有关 Linux 的更多信息。 -------------------------------------------------------------------------------- @@ -243,7 +165,7 @@ via: https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions 作者:[Jack Wallen][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[wxy](https://github.com/wxy) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8fb365cd29425beb3c48097ea92271c00b2a9f4e Mon Sep 17 00:00:00 2001 From: ZmJ <1352252181@qq.com> Date: Sun, 27 Jan 2019 19:28:10 +0800 Subject: [PATCH 019/164] TSD: 20150717 The History of Hello World --- .../20150717 The History of Hello World.md | 143 ----------------- .../20150717 The History of Hello World.md | 147 ++++++++++++++++++ 2 files changed, 147 insertions(+), 143 deletions(-) delete mode 100644 sources/tech/20150717 The History of Hello World.md create mode 100644 translated/tech/20150717 The History of Hello World.md diff --git a/sources/tech/20150717 The History of Hello World.md b/sources/tech/20150717 The History of Hello World.md deleted file mode 100644 index 9211e9f40f..0000000000 --- a/sources/tech/20150717 The History of Hello World.md +++ /dev/null @@ -1,143 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The History of Hello World) -[#]: via: (https://www.thesoftwareguild.com/blog/the-history-of-hello-world/) -[#]: author: (thussong https://www.thesoftwareguild.com/blog/author/thussong/) - -The History of Hello World -====== - - -Veteran software developers know the [Hello World][2] program as the first step in learning to code. The program, which outputs some variant of “Hello, World!” on a device’s display, can be created in most languages, making it some of the most basic syntax involved in the coding process. In fact, a recent project at the Association for Computing Machinery (ACM) at Louisiana Tech [found][3] that there are at least 204 versions of the program. - -Traditionally, Hello World programs are used to illustrate how the process of coding works, as well as to ensure that a language or system is operating correctly. They are usually the first programs that new coders learn, because even those with little or no experience can execute Hello World both easily and correctly. - -Above all, Hello World is simple. That’s why it is so often used as a barometer of program success. If Hello World does not work effectively within the framework, then it is likely that other, more complex programs will also fail. As one expert at [Win-Vector][4] puts it, Hello World is actually a confrontational program. “The author is saying ‘it isn’t obvious your computer system will work, so I am not going to invest a lot of time in it until I see it can at least print one line of text,’” Win-Vector blogger John Mount says. - -But this two-word phrase has big implications for the field of computer science. With Hello World as a foundation, novice programmers can easily understand computer science principles or elements. And professionals with years of coding experience can use it to learn how a given programming language works, especially in terms of structure and syntax. With applications at all skill levels and in almost every language, there is a long history behind such a short program. - -### Uses - -The main use for Hello World programs was outlined above: It is a way for rookie coders to become acquainted with a new language. However, the applications of these programs go beyond an introduction to the coding world. Hello World can, for example, be used as a sanity test to make sure that the components of a language (its compiler, development and run-time environment) have been correctly installed. Because the process involved in configuring a complete programming toolchain is lengthy and complex, a simple program like Hello World is often used as a first-run test on a new toolchain. - -Hackers also use Hello World “as proof of concept that arbitrary code can be executed through an exploit where the system designers did not intend code to be executed,” according to programming consultants at Cunningham & Cunningham (C2). In fact, it’s the first step in using homemade content, or “home brew” on a device. When [experienced coders][5] are configuring an environment or learning a previously unknown one, they verify that Hello World behaves correctly. - -It is also used as part of the debugging process, allowing programmers to check that they are editing the right aspect of a modifiable program at runtime and that it is being reloaded. - -One more popular use for Hello World is as a basis for comparison. Coders can “compare the size of the executable that the language generates, and how much supporting infrastructure must exist behind the program for it to execute,” according to C2’s wiki. - -### Beginnings - -Though the origins of Hello World remain somewhat unclear, its use as a test phrase is widely believed to have begun with Brian Kernigham’s 1972 book, A Tutorial Introduction to the Language B. In this text, the first known version of the program was used to illustrate external variables. Because the previous example in the tutorial printed “hi!” on the terminal, the more complex “hello, world!” required more character constants for expression and was the next step in the learning process. - -From there, it was used in a Bell Laboratories memo in 1974, as well as The C Programming Language in 1978. This popular text is what made Hello World famous. The example from that book (the first, and most pure, example) printed “hello, world,” with no capital letters or exclamation point. At this time, Hello World was used almost solely to illustrate a few functions of a language— not to test whether the system was running. - -Before Kernigham’s seminal texts on B and C, there was no standard first program. Even as late as 1972, it was not widely in use. The popular BASIC tutorial, “My Computer Likes Me, When I Speak in Basic,” starts with a simple program that writes a line of text. However, this message was “MY HUMAN UNDERSTANDS ME,” far from the two-word greeting programmers use today. But once Hello World was invented, it spread quickly, becoming well-known by the late 1970s. Its popularity continues to this day. - -### One Statement, Many Languages - -Here’s what the code for Hello World looks like in some of the most popular programming languages currently in use. - -#### Java - -``` -class HelloWorld { -public static void main(String[] args) { -System.out.println("Hello, world!"); -} -} -``` - -#### C# - -``` -using System; -class Program -{ -public static void Main(string[] args) -{ -Console.WriteLine("Hello, world!"); -} -} -``` - -#### Python - -``` -print("Hello, world!") -``` - -#### Ruby - -``` -puts "Hello, world!" -``` - -#### Scala - -``` -object HelloWorld extends App { -println("Hello, world!") -} -``` - -#### ASP.NET - -`Response.Write("Hello World!");` - -#### Lisp - -``` -(princ "Hello, world!") -``` - -#### Haskell - -``` -main = putStrLn "Hello, world!" -``` - -#### Malbolge - -``` -('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}= -``` - -#### Go - -``` -package main -import "fmt" -func main() { -fmt.Println("Hello, world!") -} -``` - -### Hello World Today: A Standard Practice in Varied Forms - -In modern coding languages, Hello World is deployed at different levels of sophistication. For example, the Go language introduced a multilingual Hello World program, and XL features a spinning, 3D version complete with graphics. Some languages, like Ruby and Python, need only a single statement to print “hello world,” but a low-level assembly language could require several commands to do so. Modern languages also introduce variations in punctuation and casing. These include the presence or absence of the comma and exclamation point, as well as the capitalization of both words. For example, when systems only support capital letters, the phrase appears as “HELLO WORLD.” The first nontrivial Malbolge program printed “HEllO WORld.” Variations go beyond the literal as well. In functional languages like Lisp and Haskell, factorial programs are substituted for Hello World to emphasize recursive techniques. This is different from the original examples, which emphasized I/O and produced side effects. - -With the increasing complexity of modern coding languages, Hello World is more important than ever. Both as a test and a teaching tool, it has become a standardized way of allowing programmers to configure their environment. No one can be sure why Hello World has stood the test of time in an industry known for rapid-fire innovation, but it is here to stay. - --------------------------------------------------------------------------------- - -via: https://www.thesoftwareguild.com/blog/the-history-of-hello-world/ - -作者:[thussong][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.thesoftwareguild.com/blog/author/thussong/ -[b]: https://github.com/lujun9972 -[1]: https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.thesoftwareguild.com%2Fblog%2Fthe-history-of-hello-world%2F&title=The%20History%20of%20Hello%20World -[2]: http://en.wikipedia.org/wiki/%22Hello,_World!%22_program -[3]: http://whatis.techtarget.com/definition/Hello-World -[4]: http://www.win-vector.com/blog/2008/02/hello-world-an-instance-rhetoric-in-computer-science/ -[5]: http://c2.com/cgi/wiki?HelloWorld diff --git a/translated/tech/20150717 The History of Hello World.md b/translated/tech/20150717 The History of Hello World.md new file mode 100644 index 0000000000..514f24d109 --- /dev/null +++ b/translated/tech/20150717 The History of Hello World.md @@ -0,0 +1,147 @@ +[#]: collector: "lujun9972" +[#]: translator: "zzzzzzmj" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "The History of Hello World" +[#]: via: "https://www.thesoftwareguild.com/blog/the-history-of-hello-world/" +[#]: author: "thussong https://www.thesoftwareguild.com/blog/author/thussong/" + + + +# Hello World 的由来 + +资深软件开发人员都知道[Hello world](2)程序,一个能被输出多种"Hello, World!"的程序,是学习编程的第一步。这个编程中只涉及到一些最基本语法的程序,可以被大多数语言输出在显示器上。事实上,路易斯安纳理工学院计算机协会(ACM)在最近统计[发现](3)这个项目至少有204个版本。 + +传统意义上,Hello World程序是用于说明编码过程是如何工作的,以及确保语言或系统能正常运行。它们经常是新手程序员学习的第一个程序,因为即使是经验很少或者没有经验的人也能轻松正确的执行Hello World。 + +首先,Hello World 简单,这就是为什么它经常被用做程序执行成功的晴雨表。如果Hello World在框架中无法有效执行,那么在其他更复杂的程序中也可能会失败。正如[Win-Vector](4)的一位专家所说,"Hello World实际上是一个对抗性程序"。该作者还说道,"你的计算机系统没有工作并不起眼,所有我们不会花很多时间在上面,不过我要看到它至少能打印一行文字"。 + +但是 这个两词短语在计算机科学领域有着重大的影响。以Hello World为基础,新手程序员可以轻松的去理解计算机科学原理,而拥有多年编码经验的程序员可以用它来学习编程语言的工作原理,特别是在结构与语言方面。这样的一个小程序,在任何难度和几乎所有的语言的应用程序中都有着悠久的历史。 + +### 用途 + +上文中一句话概括Hello World程序的主要用途:这是新手程序员熟悉新语言的一种方式。然而,这些程序不仅仅是对编码世界的介绍。例如,Hello World 可以作为测试,以确保语言的组件(编译器,开发和运行环境)安装正确。因为配置完整的编程工具链的过程复杂而漫长,所以像Hello World这样简单的程序通常用作新工具的首次运行测试。 + +根据Cunningham & Cunningham (C2)的编程顾问所说, 黑客经常使用Hello World程序, 来证明猜想,因为任何代码都可以通过漏洞执行,而系统设计人员并不允许执行代码。事实上,它是在设备上使用自制内容或者“home brew”的第一步, 当[有经验的编码人员](5)正在配置环境或在学习新事物时,他们会Hello World 来验证动作是否正确。 + +它也是作为调试的一部分,允许程序员在程序运行时检查他么编辑修改了的地方是否正确,然后重新加载。 + +Hello World的一个更常用的用途是作为基础的比较。根据C2的wiki所讲,程序员可以比较语言生成的可执行文件的大小,以及程序背后必须存在多少支持基础结构才能执行。 + +### 开端 + +虽然Hello World 的起源还有些不太明了,不过人们普遍认为它是作为测试用语,最早出现在Brian Kernigham 在1972年发布的B语言教程简介中。在此文中,该程序的第一个已知版本用于说明外部变量。因为教程中的前一个例子在终端上打印了“hi!”,而需要更多字符常量来表达相对复杂的“hello,world!”,是学习过程的下一步。 + +在那以后,它还被用于1974年的贝尔实验室备忘录,以及1987年的C语言程序设计。这两篇著名的文章是让Hello World闻名于世的主要原因。在书中的一个例子(第一个也是最著名的例子)打印了没有大写字母和感叹号的“hello,world”,此时的Hello World几乎只是用于说明语言的一些功能,而不是测试系统是否正常运行。 + +在Kernigham的关于B语言和C语言的开创性文章之前,没有真正意义上的第一个程序,甚至直到1974年,它也没被广泛使用。著名的BASIC教程“My Computer Likes Me,When I Speak BASIC”,从一个写一行文本的简单程序开始,不过那句话是“MY HUMAN UNDERSTANDS ME”,跟如今程序员侃侃而谈的双词问候语差的有点远。不过,当Hello World被发明后,它就迅速传播,并在20世纪70年代后从所周知。直到今天它也依然受欢迎。 + +### 一个声明, 多种语言 + +以下是目前正在被使用的一些流行的编程语言中的Hello World 代码 + +#### Java + +``` +class HelloWorld { +public static void main(String[] args) { +System.out.println("Hello, world!"); +} +} +``` + +#### C# + +``` +using System; +class Program +{ +public static void Main(string[] args) +{ +Console.WriteLine("Hello, world!"); +} +} +``` + +#### Python + +``` +print("Hello, world!") +``` + +#### Ruby + +``` +puts "Hello, world!" +``` + +#### Scala + +``` +object HelloWorld extends App { +println("Hello, world!") +} +``` + +#### ASP.NET + +``` +Response.Write("Hello World!"); +``` + +#### Lisp + +``` +(princ "Hello, world!") +``` + +#### Haskell + +``` +main = putStrLn "Hello, world!" +``` + +#### Malbolge + +``` +('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}= +``` + +#### Go + +``` +package main +import "fmt" +func main() { +fmt.Println("Hello, world!") +} +``` + + + +### 如今的 Hello world: 各种形式下的标准实践 + +在现在的编程语言中,Hello world有着不同的复杂程度。例如,Go语言中引入一个多语言的Hello World程序,XL则会提供一个具有图形、可旋转的3D版本。一些编程语言,像Ruby,Python,仅仅需要一个声明去打印"Hello World",但是低级汇编语言则需要几个命令才能做到这样。现在的编程语言还引入对标点符号的支持,包括逗号或者感叹号是否存在,以及两个词的大写。举个例子,当系统只支持大写字母,会呈现像"HELLO WORLD"的短语。第一个不平凡的Malbolge程序打印出了"HEllO WORld",跨域了原本的字面意思。功能语言像Lisp、Haskell,阶乘程序替代了Hello World,从而注重递归技术。这与原来的示例不同,后者更强调I/O以及产生的副作用。 + +随着现在的编程语言越来越复杂,Hello World 比以往显得更加重要。同样作为测试和教学工具,它已经成为程序员测试配置的编程环境的标准方法。没有人能确切说出为什么Hello World能在快速创新著称的行业中经受住时间的考验,但是它又确实留下来了。 + +-------------------------------------------------------------------------------- + +via: https://www.thesoftwareguild.com/blog/the-history-of-hello-world/ + +作者:[thussong][a] +选题:[lujun9972][b] +译者:[zzzzzzmj](https://github.com/zzzzzzmj) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.thesoftwareguild.com/blog/author/thussong/ +[b]: https://github.com/lujun9972 +[1]: https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.thesoftwareguild.com%2Fblog%2Fthe-history-of-hello-world%2F&title=The%20History%20of%20Hello%20World +[2]: http://en.wikipedia.org/wiki/%22Hello,_World!%22_program +[3]: http://whatis.techtarget.com/definition/Hello-World +[4]: http://www.win-vector.com/blog/2008/02/hello-world-an-instance-rhetoric-in-computer-science/ +[5]: http://c2.com/cgi/wiki?HelloWorld From 43b5a2229f831201bf6fbf9d03d5591e9749397c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 19:45:02 +0800 Subject: [PATCH 020/164] TSD:20190118 Top 5 Linux Server Distributions --- ...190118 Top 5 Linux Server Distributions.md | 268 ------------------ ...190118 Top 5 Linux Server Distributions.md | 190 +++++++++++++ 2 files changed, 190 insertions(+), 268 deletions(-) delete mode 100644 sources/tech/20190118 Top 5 Linux Server Distributions.md create mode 100644 translated/tech/20190118 Top 5 Linux Server Distributions.md diff --git a/sources/tech/20190118 Top 5 Linux Server Distributions.md b/sources/tech/20190118 Top 5 Linux Server Distributions.md deleted file mode 100644 index d9f2edf6d9..0000000000 --- a/sources/tech/20190118 Top 5 Linux Server Distributions.md +++ /dev/null @@ -1,268 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 5 Linux Server Distributions) -[#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) -[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) - -Top 5 Linux Server Distributions -====== -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstor-main.jpg?itok=VNvfEIlf) - -Ah, the age-old question: Which Linux distribution is best suited for servers? Typically, when this question is asked, the standard responses pop up: - - * RHEL - - * SUSE - - * Ubuntu Server - - * Debian - - * CentOS - - - - -However, in the name of opening your eyes to maybe something a bit different, I’m going to approach this a bit differently. I want to consider a list of possible distributions that are not only outstanding candidates but also easy to use, and that can serve many functions within your business. In some cases, my choices are drop-in replacements for other operating systems, whereas others require a bit of work to get them up to speed. - -Some of my choices are community editions of enterprise-grade servers, which could be considered gateways to purchasing a much more powerful platform. You’ll even find one or two entries here to be duty-specific platforms. Most importantly, however, what you’ll find on this list isn’t the usual fare. - -### ClearOS - -What is ClearOS? For home and small business usage, you might not find a better solution. Out of the box, ClearOS includes tools like intrusion detection, a strong firewall, bandwidth management tools, a mail server, a domain controller, and much more. What makes ClearOS stand out above some of the competition is its purpose is to server as a simple Home and SOHO server with a user-friendly, graphical web-based interface. From that interface, you’ll find an application marketplace (Figure 1), with hundreds of apps (some of which are free, whereas some have an associated cost), that makes it incredibly easy to extend the ClearOS featureset. In other words, you make ClearOS the platform your home and small business needs it to be. Best of all, unlike many other alternatives, you only pay for the software and support you need. -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/clearos.jpg?itok=knQkn5ch) -There are three different editions of ClearOS: - - * [ClearOS Community][1] - the free edition of ClearOS - - * [ClearOS Home][2] - ideal for home offices - - * [ClearOS Business][3] - ideal for small businesses, due to the inclusion of paid support - - - - -To make the installation of software even easier, the ClearOS marketplace allows you to select via: - - * By Function (which displays apps according to task) - - * By Category (which displays groups of related apps) - - * Quick Select File (which allows you to select pre-configured templates to get you up and running fast) - - - - -In other words, if you’re looking for a Linux Home, SOHO, or SMB server, ClearOS is an outstanding choice (especially if you don’t have the Linux chops to get a standard server up and running). - -### Fedora Server - -You’ve heard of Fedora Linux. Of course you have. It’s one of the finest bleeding edge distributions on the market. But did you know the developers of that excellent Fedora Desktop distribution also has a Server edition? The Fedora Server platform is a short-lifecycle, community-supported server OS. This take on the server operating system enables seasoned system administrators, experienced with any flavor of Linux (or any OS at all), to make use of the very latest technologies available in the open source community. There are three key words in that description: - - * Seasoned - - * System - - * Administrators - - - - -In other words, new users need not apply. Although Fedora Server is quite capable of handling any task you throw at it, it’s going to require someone with a bit more Linux kung fu to make it work and work well. One very nice inclusion with Fedora Server is that, out of the box, it includes one of the finest open source, web-based interface for servers on the market. With Cockpit (Figure 2) you get a quick glance at system resources, logs, storage, network, as well as the ability to manage accounts, services, applications, and updates. - -![Fedora Server][5] - -Figure 2: Cockpit running on Fedora Server. - -[Used with permission][6] - -If you’re okay working with bleeding edge software, and want an outstanding admin dashboard, Fedora Server might be the platform for you. - -### NethServer - -NethServer is about as no-brainer of a drop-in SMB Linux server as you’ll find. With the latest iteration of NethServer, your small business will enjoy: - - * Built-in Samba Active Directory Controller - - * Seamless Nextcloud integration - - * Certificate management - - * Transparent HTTPS proxy - - * Firewall - - * Mail server and filter - - * Web server and filter - - * Groupware - - * IPS/IDS or VPN - - - - -All of the included features can be easily configured with a user-friendly, web-based interface that includes single-click installation of modules to expand the NethServer feature set (Figure 3) What sets NethServer apart from ClearOS is that it was designed to make the admin job easier. In other words, this platform offers much more in the way of flexibility and power. Unlike ClearOS, which is geared more toward home office and SOHO deployments, NethServer is equally at home in small business environments. - -![NethServer][8] - -Figure 3: Adding modules to NethServer. - -[Used with permission][6] - -### Rockstor - -Rockstor is a Linux and Btfrs powered advanced Network Attached Storage (NAS) and Cloud storage server that can be deployed for Home, SOHO, as well as small- and mid-sized businesses alike. With Rockstor, you get a full-blown NAS/Cloud solution with a user-friendly, web-based GUI tool that is just as easy for admins to set up as it is for users to use. Once you have Rockstor deployed, you can create pools, shares, snapshots, manage replication and users, share files (with the help of Samba, NFS, SFTP, and AFP), and even extend the featureset, thanks to add-ons (called Rock-ons). The list of Rock-ons includes: - - * CouchPotato (Downloader for usenet and bittorrent users) - - * Deluge (Movie downloader for bittorrent users) - - * EmbyServer (Emby media server) - - * Ghost (Publishing platform for professional bloggers) - - * GitLab CE (Git repository hosting and collaboration) - - * Gogs Go Git Service (Lightweight Git version control server and front end) - - * Headphones (An automated music downloader for NZB and Torrent) - - * Logitech Squeezebox Server for Squeezebox Devices - - * MariaDB (Relational database management system) - - * NZBGet (Efficient usenet downloader) - - * OwnCloud-Official (Secure file sharing and hosting) - - * Plexpy (Python-based Plex Usage tracker) - - * Rocket.Chat (Open Source Chat Platform) - - * SaBnzbd (Usenet downloader) - - * Sickbeard (Internet PVR for TV shows) - - * Sickrage (Automatic Video Library Manager for TV Shows) - - * Sonarr (PVR for usenet and bittorrent users) - - * Symform (Backup service) - - - - -Rockstor also includes an at-a-glance dashboard that gives admins quick access to all the information they need about their server (Figure 4). - -![Rockstor][10] - -The Rockstor dashboard in action. - -[Used with permission][6] - -### Zentyal - -Zentyal is another Small Business Server that does a great job of handling multiple tasks. If you’re looking for a Linux distribution that can handle the likes of: - - * Directory and Domain server - - * Mail server - - * Gateway - - * DHCP, DNS, and NTP server - - * Certification Authority - - * VPN - - * Instant Messaging - - * FTP server - - * Antivirus - - * SSO authentication - - * File sharing - - * RADIUS - - * Virtualization Management - - * And more - - - - -Zentyal might be your new go-to. Zentyal has been around since 2004 and is based on Ubuntu Server, so it enjoys a rock-solid base and plenty of applications. And with the help of the Zentyal dashboard (Figure 5), admins can easily manage: - - * System - - * Network - - * Logs - - * Software updates and installation - - * Users/groups - - * Domains - - * File sharing - - * Mail - - * DNS - - * Firewall - - * Certificates - - * And much more - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/zentyal.jpg?itok=Un9lpgh6) - - -Adding new components to the Zentyal server is as simple as opening the Dashboard, clicking on Software Management > Zentyal Components, selecting what you want to add, and clicking Install. The one issue you might find with Zentyal is that it doesn’t offer nearly the amount of addons as you’ll find in the likes of Nethserver and ClearOS. But the services it does offer, Zentyal does incredibly well. - -### Plenty More Where These Came From - -This list of Linux servers is clearly not exhaustive. What it is, however, is a unique look at the top five server distributions you’ve probably not heard of. Of course, if you’d rather opt to use a more traditional Linux server distribution, you can always stick with [CentOS][11], [Ubuntu Server][12], [SUSE][13], [Red Hat Enterprise Linux][14], or [Debian][15]… most of which are found on every list of best server distributions on the market. If, however, you’re looking for something a bit different, give one of these five distos a try. - -Learn more about Linux through the free ["Introduction to Linux" ][16]course from The Linux Foundation and edX. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions - -作者:[Jack Wallen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/jlwallen -[b]: https://github.com/lujun9972 -[1]: https://www.clearos.com/clearfoundation/software/clearos-7-community -[2]: https://www.clearos.com/products/clearos-editions/clearos-7-home -[3]: https://www.clearos.com/products/clearos-editions/clearos-7-business -[4]: https://www.linux.com/files/images/fedoraserverjpg -[5]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/fedoraserver.jpg?itok=phaAIRXW (Fedora Server) -[6]: https://www.linux.com/licenses/category/used-permission -[7]: https://www.linux.com/files/images/nethserverjpg -[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/nethserver.jpg?itok=HO-CRbOV (NethServer) -[9]: https://www.linux.com/files/images/rockstorejpg -[10]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstore.jpg?itok=EN_5oFxQ (Rockstor) -[11]: https://www.centos.org/ -[12]: https://www.ubuntu.com/download/server -[13]: https://www.suse.com/ -[14]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[15]: https://www.debian.org/ -[16]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/translated/tech/20190118 Top 5 Linux Server Distributions.md b/translated/tech/20190118 Top 5 Linux Server Distributions.md new file mode 100644 index 0000000000..b263bb3b89 --- /dev/null +++ b/translated/tech/20190118 Top 5 Linux Server Distributions.md @@ -0,0 +1,190 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top 5 Linux Server Distributions) +[#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) +[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) + +另一种 5 个顶级 Linux 服务器发行版 +====== + +> Jack Wallen 为 Linux 服务器发行版提供了一些可靠的选择,绝对值回票价。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstor-main.jpg?itok=VNvfEIlf) + +啊,这个古老的问题:哪种 Linux 发行版最适合做服务器?通常,问这种问题时,所浮现出来的标准的答复就是: + + * RHEL + * SUSE + * Ubuntu 服务器 + * Debian + * CentOS + +然而,假如你将眼界放得更宽(不将服务器只看做是 IDC 托管的那种互联网服务器时),可能答案会有点不同。我准备稍微来点不同的。我想做出一个满足入选标准的发行版列表,这些发行版不仅是优秀的候选者,而且易于使用,可以为你的业务中的许多功能提供服务。在某些情况下,我选择的是一些替代品,可以取代其它需要一些工作才能达成要求的操作系统。 + +我的一些选择是企业级服务器的社区版本,它们可以被视为购买更强大平台的入门级产品。你甚至可以在这里找到一两个作为特定任务平台的候选者。然而,最重要的是,你在此列表中找到的并非寻常的泛泛之辈。 + +### ClearOS + +什么是 ClearOS?对于家庭和小型企业用途,你可能找不到比它更好的解决方案。ClearOS 开箱即用,包括了入侵检测、强大的防火墙、带宽管理工具、邮件服务器、域控制器等工具。其目的是将服务器作为一个简单的家庭和 SOHO 服务器,并具有用户友好的基于 Web 的图形化界面,这使得 ClearOS 在某些评比中脱颖而出。从其界面中,你可以找到一个应用程序市场(图 1),其中包含数百个应用程序(其中一些是免费的,而另一些则具有相关费用),这使得扩展 ClearOS 功能集非常容易。换句话说,你可以将 ClearOS 作为你的家庭和小型企业所需的平台。最重要的是,与许多其他替代方案不同,你只需支付所需的软件和支持。 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/clearos.jpg?itok=knQkn5ch) + +*图 1:ClearOS 应用程序市场* + +有三种版本的 ClearOS: + + * [ClearOS Community][1] - 免费版 ClearOS + * [ClearOS Home][2] - 适于家庭办公 + * [ClearOS Business][3] - 适于小型企业,包括了付费支持。 + +为了使软件安装更加容易,ClearOS 应用市场允许你通过以下方式进行选择软件: + +   * 按功能(根据任务显示应用程序) +   * 按类别(显示相关应用程序组) +   * 快速选择文件(允许你按预先配置的模板选择,以帮助你快速启动和运行) + +换句话说,如果你正在寻找 Linux 的家庭、SOHO 或 SMB 服务器,ClearOS 是一个出色的选择(特别是如果你没有启动和运行标准的 Linux 服务器的能力时)。 + +### Fedora 服务器 + +你肯定听说过 Fedora Linux。它是市场上最好的前沿发行版之一。但是你知道这个出色的 Fedora 桌面发行版的开发者们也开发了服务器版吗?Fedora 服务器平台是一个短生命周期的、社区支持的服务器操作系统。这使得经验丰富的、或对任何类型的 Linux(或任何操作系统)有经验的系统管理员,可以使用开源社区中提供的最新技术。在这段描述中有三个关键词: + + * 经验丰富 + * 系统 + * 管理员 + +换言之,新用户就不要考虑了。虽然 Fedora 服务器完全能够处理你抛出的任何任务,但它需要一些拥有更多的 Linux 功夫的人来使它工作并且运行良好。Fedora 服务器非常好的一点是,开箱即用,它包括了市场上用于服务器的开源的基于 Web 的最好的界面之一。通过 Cockpit(图 2),你可以快速浏览系统资源、日志、存储、网络以及拥有管理帐户、服务、应用程序和更新的能力。 + +![Fedora Server][5] + +*图 2:运行在 Fedora 服务器上的 Cockpit* + +如果你可以使用最前沿的软件,并想要一个出色的管理仪表板,Fedora 服务器可能就是你要的平台。 + +### NethServer + +正如你所发现的那样,NethServer 是每个人都知道的简单 SMB Linux 服务器。通过 NethServer 的最新版本,你的小型企业将得到: + + * 内置 Samba 活动目录控制器 +   * 与 Nextcloud 的无缝集成 +   * 证书管理 +   * HTTPS 透明代理 +   * 防火墙 +   * 邮件服务器和过滤器 +   * Web 服务器和过滤器 +   * 群件 +   * IPS / IDS 或 VPN + +所有包含的功能都可以通过用户友好的基于 Web 的界面轻松配置,包括单击安装模块以扩展 NethServer 功能集(图 3)。NethServer 与 ClearOS 的区别在于它的设计目的是使管理工作更轻松。换句话说,这个平台提供了更多的灵活性和功能。与面向家庭办公室和 SOHO 部署的 ClearOS 不同,NethServer 在小型商业环境中用起来就像在家庭里使用一样方便。 + +![NethServer][8] + +*图 3:给 NethServer 添加模块* + +### Rockstor + +Rockstor 是采用 Linux 和 Btfrs 的高级网络附加存储(NAS)和云存储服务器,可部署用于家庭、SOHO 以及中小型企业。借助 Rockstor,你可以获得一个完整的 NAS /云解决方案,其中包含一个用户友好的基于 Web 的 GUI 工具,管理员可以像普通用户一样轻松使用它来设置。一旦部署好了 Rockstor,你就可以创建存储池、共享、快照、管理复制和用户、共享文件(借助 Samba、NFS、SFTP 和 AFP),甚至扩展它的功能集,这要归功于附加组件(称为 Rock-ons)。Rock-ons 列表包括: + + * CouchPotato(Usenet 和 BitTorrent 用户的下载器) + * Deluge(BitTorrent 用户的电影下载器) + * EmbyServer(Emby 媒体服务器) + * Ghost(专业博主的发布平台) + * GitLab CE(Git 仓库托管和协作) + * Gogs Go Git Service(轻量级 Git 版本控制服务器和前端) + * Headphones(NZB 和 Torrent 的音乐自动下载器) + * 用于 Squeezebox 设备的罗技 Squeezebox 服务器 + * MariaDB(关系型数据管理系统) + * NZBGet(高效的 usenet 下载器) + * OwnCloud-Official(安全的文件共享和托管) + * Plexpy(基于 Python 的 Plex 用量跟踪器) + * Rocket.Chat(开源聊天平台) + * SaBnzbd(Usenet 下载器) + * Sickbeard(用于电视节目的互联网个人视频录像机) + * Sickrage(电视节目的自动视频库管理器) + * Sonarr(Usenet 和 BitTorrent 用户的个人视频录像机) + * Symform(备份设备) + +Rockstor 还包括了一目了然的仪表板,使管理员可以快速访问他们所需的有关其服务器的所有信息(图 4)。 + +![Rockstor][10] + +*图 4: Rockstor 面板* + +### Zentyal + +Zentyal 是另一个小型企业服务器,可以很好地处理多个任务。如果你正在寻找可以处理以下内容的 Linux 发行版: + + * 目录和域服务器 + * 邮件服务器 + * 网关 + * DHCP、DNS 和 NTP 服务器 + * 认证机构(CA) + * VPN + * 实时消息(IM) + * FTP 服务器 + * 反病毒 + * SSO 认证 + * 文件共享 + * RADIUS 认证 + * 虚拟化管理 + * 等等 + +Zentyal 可能是你的新选择。从 2004 年 Zentyal 就存在了,它基于 Ubuntu Server,因此它拥有坚实的基础和丰富的应用程序。在 Zentyal 仪表板的帮助下(图 5),管理员可以轻松管理: + + * 系统 + * 网络 + * 日志 + * 软件更新和安装 + * 用户/组 + * 域 + * 文件共享 + * 邮件 + * DNS + * 防火墙 + * 证书 + * 等等 + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/zentyal.jpg?itok=Un9lpgh6) + +*图 5:Zentyal 仪表板* + +向 Zentyal 服务器添加新组件只需要打开仪表板,单击“软件管理” -> “Zentyal 组件”,选择要添加的组件,然后单击安装。Zentyal 可能会遇到的一个问题是,它提供不了与 Nethserver 和 ClearOS 一样多的插件。但它提供的服务,则做得非常好。 + +### 更多来自于 + +这个 Linux 服务器列表显然不是详尽无遗的。然而,这是一种对你可能没有听说过的五大服务器发行版的独特视角。当然,如果你更愿意使用更传统的 Linux 服务器发行版,你可以随时坚持使用 [CentOS][11]、[Ubuntu 服务器][12]、[SUSE][13]、[RHEL][14] 或 [Debian][15]……它们大多都出现在市场上最好的服务器发行版列表中。但是,如果你正在寻找一些不同的东西,那么试试这五个发行版中的一个。 + +通过 Linux 基金会和 edX 的免费[“Linux 简介”][16]课程了解有关 Linux 的更多信息。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions + +作者:[Jack Wallen][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/jlwallen +[b]: https://github.com/lujun9972 +[1]: https://www.clearos.com/clearfoundation/software/clearos-7-community +[2]: https://www.clearos.com/products/clearos-editions/clearos-7-home +[3]: https://www.clearos.com/products/clearos-editions/clearos-7-business +[4]: https://www.linux.com/files/images/fedoraserverjpg +[5]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/fedoraserver.jpg?itok=phaAIRXW (Fedora Server) +[6]: https://www.linux.com/licenses/category/used-permission +[7]: https://www.linux.com/files/images/nethserverjpg +[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/nethserver.jpg?itok=HO-CRbOV (NethServer) +[9]: https://www.linux.com/files/images/rockstorejpg +[10]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstore.jpg?itok=EN_5oFxQ (Rockstor) +[11]: https://www.centos.org/ +[12]: https://www.ubuntu.com/download/server +[13]: https://www.suse.com/ +[14]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[15]: https://www.debian.org/ +[16]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux From a2f90a20f0cc8daee032d781775314b572d801a0 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 27 Jan 2019 19:53:42 +0800 Subject: [PATCH 021/164] Translating by MjSeven --- ...20181203 How to bring good fortune to your Linux terminal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181203 How to bring good fortune to your Linux terminal.md b/sources/tech/20181203 How to bring good fortune to your Linux terminal.md index 7549dc0249..28bd2996a1 100644 --- a/sources/tech/20181203 How to bring good fortune to your Linux terminal.md +++ b/sources/tech/20181203 How to bring good fortune to your Linux terminal.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: subject: (How to bring good fortune to your Linux terminal) From b342cb4a87c0f29c09a7d223f9052e1f5da214ee Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 19:58:21 +0800 Subject: [PATCH 022/164] Revert "TSD:20190118 Top 5 Linux Server Distributions" This reverts commit 43b5a2229f831201bf6fbf9d03d5591e9749397c. --- ...190118 Top 5 Linux Server Distributions.md | 268 ++++++++++++++++++ ...190118 Top 5 Linux Server Distributions.md | 190 ------------- 2 files changed, 268 insertions(+), 190 deletions(-) create mode 100644 sources/tech/20190118 Top 5 Linux Server Distributions.md delete mode 100644 translated/tech/20190118 Top 5 Linux Server Distributions.md diff --git a/sources/tech/20190118 Top 5 Linux Server Distributions.md b/sources/tech/20190118 Top 5 Linux Server Distributions.md new file mode 100644 index 0000000000..d9f2edf6d9 --- /dev/null +++ b/sources/tech/20190118 Top 5 Linux Server Distributions.md @@ -0,0 +1,268 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top 5 Linux Server Distributions) +[#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) +[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) + +Top 5 Linux Server Distributions +====== +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstor-main.jpg?itok=VNvfEIlf) + +Ah, the age-old question: Which Linux distribution is best suited for servers? Typically, when this question is asked, the standard responses pop up: + + * RHEL + + * SUSE + + * Ubuntu Server + + * Debian + + * CentOS + + + + +However, in the name of opening your eyes to maybe something a bit different, I’m going to approach this a bit differently. I want to consider a list of possible distributions that are not only outstanding candidates but also easy to use, and that can serve many functions within your business. In some cases, my choices are drop-in replacements for other operating systems, whereas others require a bit of work to get them up to speed. + +Some of my choices are community editions of enterprise-grade servers, which could be considered gateways to purchasing a much more powerful platform. You’ll even find one or two entries here to be duty-specific platforms. Most importantly, however, what you’ll find on this list isn’t the usual fare. + +### ClearOS + +What is ClearOS? For home and small business usage, you might not find a better solution. Out of the box, ClearOS includes tools like intrusion detection, a strong firewall, bandwidth management tools, a mail server, a domain controller, and much more. What makes ClearOS stand out above some of the competition is its purpose is to server as a simple Home and SOHO server with a user-friendly, graphical web-based interface. From that interface, you’ll find an application marketplace (Figure 1), with hundreds of apps (some of which are free, whereas some have an associated cost), that makes it incredibly easy to extend the ClearOS featureset. In other words, you make ClearOS the platform your home and small business needs it to be. Best of all, unlike many other alternatives, you only pay for the software and support you need. +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/clearos.jpg?itok=knQkn5ch) +There are three different editions of ClearOS: + + * [ClearOS Community][1] - the free edition of ClearOS + + * [ClearOS Home][2] - ideal for home offices + + * [ClearOS Business][3] - ideal for small businesses, due to the inclusion of paid support + + + + +To make the installation of software even easier, the ClearOS marketplace allows you to select via: + + * By Function (which displays apps according to task) + + * By Category (which displays groups of related apps) + + * Quick Select File (which allows you to select pre-configured templates to get you up and running fast) + + + + +In other words, if you’re looking for a Linux Home, SOHO, or SMB server, ClearOS is an outstanding choice (especially if you don’t have the Linux chops to get a standard server up and running). + +### Fedora Server + +You’ve heard of Fedora Linux. Of course you have. It’s one of the finest bleeding edge distributions on the market. But did you know the developers of that excellent Fedora Desktop distribution also has a Server edition? The Fedora Server platform is a short-lifecycle, community-supported server OS. This take on the server operating system enables seasoned system administrators, experienced with any flavor of Linux (or any OS at all), to make use of the very latest technologies available in the open source community. There are three key words in that description: + + * Seasoned + + * System + + * Administrators + + + + +In other words, new users need not apply. Although Fedora Server is quite capable of handling any task you throw at it, it’s going to require someone with a bit more Linux kung fu to make it work and work well. One very nice inclusion with Fedora Server is that, out of the box, it includes one of the finest open source, web-based interface for servers on the market. With Cockpit (Figure 2) you get a quick glance at system resources, logs, storage, network, as well as the ability to manage accounts, services, applications, and updates. + +![Fedora Server][5] + +Figure 2: Cockpit running on Fedora Server. + +[Used with permission][6] + +If you’re okay working with bleeding edge software, and want an outstanding admin dashboard, Fedora Server might be the platform for you. + +### NethServer + +NethServer is about as no-brainer of a drop-in SMB Linux server as you’ll find. With the latest iteration of NethServer, your small business will enjoy: + + * Built-in Samba Active Directory Controller + + * Seamless Nextcloud integration + + * Certificate management + + * Transparent HTTPS proxy + + * Firewall + + * Mail server and filter + + * Web server and filter + + * Groupware + + * IPS/IDS or VPN + + + + +All of the included features can be easily configured with a user-friendly, web-based interface that includes single-click installation of modules to expand the NethServer feature set (Figure 3) What sets NethServer apart from ClearOS is that it was designed to make the admin job easier. In other words, this platform offers much more in the way of flexibility and power. Unlike ClearOS, which is geared more toward home office and SOHO deployments, NethServer is equally at home in small business environments. + +![NethServer][8] + +Figure 3: Adding modules to NethServer. + +[Used with permission][6] + +### Rockstor + +Rockstor is a Linux and Btfrs powered advanced Network Attached Storage (NAS) and Cloud storage server that can be deployed for Home, SOHO, as well as small- and mid-sized businesses alike. With Rockstor, you get a full-blown NAS/Cloud solution with a user-friendly, web-based GUI tool that is just as easy for admins to set up as it is for users to use. Once you have Rockstor deployed, you can create pools, shares, snapshots, manage replication and users, share files (with the help of Samba, NFS, SFTP, and AFP), and even extend the featureset, thanks to add-ons (called Rock-ons). The list of Rock-ons includes: + + * CouchPotato (Downloader for usenet and bittorrent users) + + * Deluge (Movie downloader for bittorrent users) + + * EmbyServer (Emby media server) + + * Ghost (Publishing platform for professional bloggers) + + * GitLab CE (Git repository hosting and collaboration) + + * Gogs Go Git Service (Lightweight Git version control server and front end) + + * Headphones (An automated music downloader for NZB and Torrent) + + * Logitech Squeezebox Server for Squeezebox Devices + + * MariaDB (Relational database management system) + + * NZBGet (Efficient usenet downloader) + + * OwnCloud-Official (Secure file sharing and hosting) + + * Plexpy (Python-based Plex Usage tracker) + + * Rocket.Chat (Open Source Chat Platform) + + * SaBnzbd (Usenet downloader) + + * Sickbeard (Internet PVR for TV shows) + + * Sickrage (Automatic Video Library Manager for TV Shows) + + * Sonarr (PVR for usenet and bittorrent users) + + * Symform (Backup service) + + + + +Rockstor also includes an at-a-glance dashboard that gives admins quick access to all the information they need about their server (Figure 4). + +![Rockstor][10] + +The Rockstor dashboard in action. + +[Used with permission][6] + +### Zentyal + +Zentyal is another Small Business Server that does a great job of handling multiple tasks. If you’re looking for a Linux distribution that can handle the likes of: + + * Directory and Domain server + + * Mail server + + * Gateway + + * DHCP, DNS, and NTP server + + * Certification Authority + + * VPN + + * Instant Messaging + + * FTP server + + * Antivirus + + * SSO authentication + + * File sharing + + * RADIUS + + * Virtualization Management + + * And more + + + + +Zentyal might be your new go-to. Zentyal has been around since 2004 and is based on Ubuntu Server, so it enjoys a rock-solid base and plenty of applications. And with the help of the Zentyal dashboard (Figure 5), admins can easily manage: + + * System + + * Network + + * Logs + + * Software updates and installation + + * Users/groups + + * Domains + + * File sharing + + * Mail + + * DNS + + * Firewall + + * Certificates + + * And much more + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/zentyal.jpg?itok=Un9lpgh6) + + +Adding new components to the Zentyal server is as simple as opening the Dashboard, clicking on Software Management > Zentyal Components, selecting what you want to add, and clicking Install. The one issue you might find with Zentyal is that it doesn’t offer nearly the amount of addons as you’ll find in the likes of Nethserver and ClearOS. But the services it does offer, Zentyal does incredibly well. + +### Plenty More Where These Came From + +This list of Linux servers is clearly not exhaustive. What it is, however, is a unique look at the top five server distributions you’ve probably not heard of. Of course, if you’d rather opt to use a more traditional Linux server distribution, you can always stick with [CentOS][11], [Ubuntu Server][12], [SUSE][13], [Red Hat Enterprise Linux][14], or [Debian][15]… most of which are found on every list of best server distributions on the market. If, however, you’re looking for something a bit different, give one of these five distos a try. + +Learn more about Linux through the free ["Introduction to Linux" ][16]course from The Linux Foundation and edX. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions + +作者:[Jack Wallen][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/jlwallen +[b]: https://github.com/lujun9972 +[1]: https://www.clearos.com/clearfoundation/software/clearos-7-community +[2]: https://www.clearos.com/products/clearos-editions/clearos-7-home +[3]: https://www.clearos.com/products/clearos-editions/clearos-7-business +[4]: https://www.linux.com/files/images/fedoraserverjpg +[5]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/fedoraserver.jpg?itok=phaAIRXW (Fedora Server) +[6]: https://www.linux.com/licenses/category/used-permission +[7]: https://www.linux.com/files/images/nethserverjpg +[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/nethserver.jpg?itok=HO-CRbOV (NethServer) +[9]: https://www.linux.com/files/images/rockstorejpg +[10]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstore.jpg?itok=EN_5oFxQ (Rockstor) +[11]: https://www.centos.org/ +[12]: https://www.ubuntu.com/download/server +[13]: https://www.suse.com/ +[14]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux +[15]: https://www.debian.org/ +[16]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/translated/tech/20190118 Top 5 Linux Server Distributions.md b/translated/tech/20190118 Top 5 Linux Server Distributions.md deleted file mode 100644 index b263bb3b89..0000000000 --- a/translated/tech/20190118 Top 5 Linux Server Distributions.md +++ /dev/null @@ -1,190 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 5 Linux Server Distributions) -[#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) -[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) - -另一种 5 个顶级 Linux 服务器发行版 -====== - -> Jack Wallen 为 Linux 服务器发行版提供了一些可靠的选择,绝对值回票价。 - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstor-main.jpg?itok=VNvfEIlf) - -啊,这个古老的问题:哪种 Linux 发行版最适合做服务器?通常,问这种问题时,所浮现出来的标准的答复就是: - - * RHEL - * SUSE - * Ubuntu 服务器 - * Debian - * CentOS - -然而,假如你将眼界放得更宽(不将服务器只看做是 IDC 托管的那种互联网服务器时),可能答案会有点不同。我准备稍微来点不同的。我想做出一个满足入选标准的发行版列表,这些发行版不仅是优秀的候选者,而且易于使用,可以为你的业务中的许多功能提供服务。在某些情况下,我选择的是一些替代品,可以取代其它需要一些工作才能达成要求的操作系统。 - -我的一些选择是企业级服务器的社区版本,它们可以被视为购买更强大平台的入门级产品。你甚至可以在这里找到一两个作为特定任务平台的候选者。然而,最重要的是,你在此列表中找到的并非寻常的泛泛之辈。 - -### ClearOS - -什么是 ClearOS?对于家庭和小型企业用途,你可能找不到比它更好的解决方案。ClearOS 开箱即用,包括了入侵检测、强大的防火墙、带宽管理工具、邮件服务器、域控制器等工具。其目的是将服务器作为一个简单的家庭和 SOHO 服务器,并具有用户友好的基于 Web 的图形化界面,这使得 ClearOS 在某些评比中脱颖而出。从其界面中,你可以找到一个应用程序市场(图 1),其中包含数百个应用程序(其中一些是免费的,而另一些则具有相关费用),这使得扩展 ClearOS 功能集非常容易。换句话说,你可以将 ClearOS 作为你的家庭和小型企业所需的平台。最重要的是,与许多其他替代方案不同,你只需支付所需的软件和支持。 - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/clearos.jpg?itok=knQkn5ch) - -*图 1:ClearOS 应用程序市场* - -有三种版本的 ClearOS: - - * [ClearOS Community][1] - 免费版 ClearOS - * [ClearOS Home][2] - 适于家庭办公 - * [ClearOS Business][3] - 适于小型企业,包括了付费支持。 - -为了使软件安装更加容易,ClearOS 应用市场允许你通过以下方式进行选择软件: - -   * 按功能(根据任务显示应用程序) -   * 按类别(显示相关应用程序组) -   * 快速选择文件(允许你按预先配置的模板选择,以帮助你快速启动和运行) - -换句话说,如果你正在寻找 Linux 的家庭、SOHO 或 SMB 服务器,ClearOS 是一个出色的选择(特别是如果你没有启动和运行标准的 Linux 服务器的能力时)。 - -### Fedora 服务器 - -你肯定听说过 Fedora Linux。它是市场上最好的前沿发行版之一。但是你知道这个出色的 Fedora 桌面发行版的开发者们也开发了服务器版吗?Fedora 服务器平台是一个短生命周期的、社区支持的服务器操作系统。这使得经验丰富的、或对任何类型的 Linux(或任何操作系统)有经验的系统管理员,可以使用开源社区中提供的最新技术。在这段描述中有三个关键词: - - * 经验丰富 - * 系统 - * 管理员 - -换言之,新用户就不要考虑了。虽然 Fedora 服务器完全能够处理你抛出的任何任务,但它需要一些拥有更多的 Linux 功夫的人来使它工作并且运行良好。Fedora 服务器非常好的一点是,开箱即用,它包括了市场上用于服务器的开源的基于 Web 的最好的界面之一。通过 Cockpit(图 2),你可以快速浏览系统资源、日志、存储、网络以及拥有管理帐户、服务、应用程序和更新的能力。 - -![Fedora Server][5] - -*图 2:运行在 Fedora 服务器上的 Cockpit* - -如果你可以使用最前沿的软件,并想要一个出色的管理仪表板,Fedora 服务器可能就是你要的平台。 - -### NethServer - -正如你所发现的那样,NethServer 是每个人都知道的简单 SMB Linux 服务器。通过 NethServer 的最新版本,你的小型企业将得到: - - * 内置 Samba 活动目录控制器 -   * 与 Nextcloud 的无缝集成 -   * 证书管理 -   * HTTPS 透明代理 -   * 防火墙 -   * 邮件服务器和过滤器 -   * Web 服务器和过滤器 -   * 群件 -   * IPS / IDS 或 VPN - -所有包含的功能都可以通过用户友好的基于 Web 的界面轻松配置,包括单击安装模块以扩展 NethServer 功能集(图 3)。NethServer 与 ClearOS 的区别在于它的设计目的是使管理工作更轻松。换句话说,这个平台提供了更多的灵活性和功能。与面向家庭办公室和 SOHO 部署的 ClearOS 不同,NethServer 在小型商业环境中用起来就像在家庭里使用一样方便。 - -![NethServer][8] - -*图 3:给 NethServer 添加模块* - -### Rockstor - -Rockstor 是采用 Linux 和 Btfrs 的高级网络附加存储(NAS)和云存储服务器,可部署用于家庭、SOHO 以及中小型企业。借助 Rockstor,你可以获得一个完整的 NAS /云解决方案,其中包含一个用户友好的基于 Web 的 GUI 工具,管理员可以像普通用户一样轻松使用它来设置。一旦部署好了 Rockstor,你就可以创建存储池、共享、快照、管理复制和用户、共享文件(借助 Samba、NFS、SFTP 和 AFP),甚至扩展它的功能集,这要归功于附加组件(称为 Rock-ons)。Rock-ons 列表包括: - - * CouchPotato(Usenet 和 BitTorrent 用户的下载器) - * Deluge(BitTorrent 用户的电影下载器) - * EmbyServer(Emby 媒体服务器) - * Ghost(专业博主的发布平台) - * GitLab CE(Git 仓库托管和协作) - * Gogs Go Git Service(轻量级 Git 版本控制服务器和前端) - * Headphones(NZB 和 Torrent 的音乐自动下载器) - * 用于 Squeezebox 设备的罗技 Squeezebox 服务器 - * MariaDB(关系型数据管理系统) - * NZBGet(高效的 usenet 下载器) - * OwnCloud-Official(安全的文件共享和托管) - * Plexpy(基于 Python 的 Plex 用量跟踪器) - * Rocket.Chat(开源聊天平台) - * SaBnzbd(Usenet 下载器) - * Sickbeard(用于电视节目的互联网个人视频录像机) - * Sickrage(电视节目的自动视频库管理器) - * Sonarr(Usenet 和 BitTorrent 用户的个人视频录像机) - * Symform(备份设备) - -Rockstor 还包括了一目了然的仪表板,使管理员可以快速访问他们所需的有关其服务器的所有信息(图 4)。 - -![Rockstor][10] - -*图 4: Rockstor 面板* - -### Zentyal - -Zentyal 是另一个小型企业服务器,可以很好地处理多个任务。如果你正在寻找可以处理以下内容的 Linux 发行版: - - * 目录和域服务器 - * 邮件服务器 - * 网关 - * DHCP、DNS 和 NTP 服务器 - * 认证机构(CA) - * VPN - * 实时消息(IM) - * FTP 服务器 - * 反病毒 - * SSO 认证 - * 文件共享 - * RADIUS 认证 - * 虚拟化管理 - * 等等 - -Zentyal 可能是你的新选择。从 2004 年 Zentyal 就存在了,它基于 Ubuntu Server,因此它拥有坚实的基础和丰富的应用程序。在 Zentyal 仪表板的帮助下(图 5),管理员可以轻松管理: - - * 系统 - * 网络 - * 日志 - * 软件更新和安装 - * 用户/组 - * 域 - * 文件共享 - * 邮件 - * DNS - * 防火墙 - * 证书 - * 等等 - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/zentyal.jpg?itok=Un9lpgh6) - -*图 5:Zentyal 仪表板* - -向 Zentyal 服务器添加新组件只需要打开仪表板,单击“软件管理” -> “Zentyal 组件”,选择要添加的组件,然后单击安装。Zentyal 可能会遇到的一个问题是,它提供不了与 Nethserver 和 ClearOS 一样多的插件。但它提供的服务,则做得非常好。 - -### 更多来自于 - -这个 Linux 服务器列表显然不是详尽无遗的。然而,这是一种对你可能没有听说过的五大服务器发行版的独特视角。当然,如果你更愿意使用更传统的 Linux 服务器发行版,你可以随时坚持使用 [CentOS][11]、[Ubuntu 服务器][12]、[SUSE][13]、[RHEL][14] 或 [Debian][15]……它们大多都出现在市场上最好的服务器发行版列表中。但是,如果你正在寻找一些不同的东西,那么试试这五个发行版中的一个。 - -通过 Linux 基金会和 edX 的免费[“Linux 简介”][16]课程了解有关 Linux 的更多信息。 - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions - -作者:[Jack Wallen][a] -选题:[lujun9972][b] -译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/jlwallen -[b]: https://github.com/lujun9972 -[1]: https://www.clearos.com/clearfoundation/software/clearos-7-community -[2]: https://www.clearos.com/products/clearos-editions/clearos-7-home -[3]: https://www.clearos.com/products/clearos-editions/clearos-7-business -[4]: https://www.linux.com/files/images/fedoraserverjpg -[5]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/fedoraserver.jpg?itok=phaAIRXW (Fedora Server) -[6]: https://www.linux.com/licenses/category/used-permission -[7]: https://www.linux.com/files/images/nethserverjpg -[8]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/nethserver.jpg?itok=HO-CRbOV (NethServer) -[9]: https://www.linux.com/files/images/rockstorejpg -[10]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/rockstore.jpg?itok=EN_5oFxQ (Rockstor) -[11]: https://www.centos.org/ -[12]: https://www.ubuntu.com/download/server -[13]: https://www.suse.com/ -[14]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[15]: https://www.debian.org/ -[16]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux From 5cd0650e14e3bd31e00dbadcaf05caa2b719039f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 20:21:15 +0800 Subject: [PATCH 023/164] PUB:20180722 Dawn of the Microcomputer- The Altair 8800.md @zhs852 https://linux.cn/article-10482-1.html --- .../20180722 Dawn of the Microcomputer- The Altair 8800.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20180722 Dawn of the Microcomputer- The Altair 8800.md (100%) diff --git a/translated/talk/20180722 Dawn of the Microcomputer- The Altair 8800.md b/published/20180722 Dawn of the Microcomputer- The Altair 8800.md similarity index 100% rename from translated/talk/20180722 Dawn of the Microcomputer- The Altair 8800.md rename to published/20180722 Dawn of the Microcomputer- The Altair 8800.md From 484178f9066002edde72d651eab40cba13f7d079 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 20:51:20 +0800 Subject: [PATCH 024/164] PUB:20180606 Working with modules in Fedora 28.md @geekpi --- ...80606 Working with modules in Fedora 28.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) rename {translated/tech => published}/20180606 Working with modules in Fedora 28.md (90%) diff --git a/translated/tech/20180606 Working with modules in Fedora 28.md b/published/20180606 Working with modules in Fedora 28.md similarity index 90% rename from translated/tech/20180606 Working with modules in Fedora 28.md rename to published/20180606 Working with modules in Fedora 28.md index bf5c4237f2..338e6accc6 100644 --- a/translated/tech/20180606 Working with modules in Fedora 28.md +++ b/published/20180606 Working with modules in Fedora 28.md @@ -23,7 +23,7 @@ sudo dnf -y update dnf module list ``` -输出列出了一组模块,这些模块显示了每个模块的关联流、版本和可用安装配置文件。模块流旁边的 `[d]` 表示安装命名模块时使用的默认流。 +输出列出了一组模块,这些模块显示了每个模块的关联的流、版本和可用安装配置文件。模块流旁边的 `[d]` 表示安装命名模块时使用的默认流。 输出还显示大多数模块都有名为 `default` 的配置文件。这不是巧合,因为 `default` 是默认配置文件使用的名称。 @@ -83,22 +83,22 @@ sudo dnf -y module install reviewboard/server 但是,安装 reviewboard:3.0/server 配置非常平常。reviewboard:3.0 模块的服务器配置与默认配置文件相同 —— 因此无需安装。 -### 启动 Review Board 网站 +### 启动 Review Board 网站 现在已经安装了 Review Board 3.0 模块及其相关软件包,[创建一个本地运行的 Review Board 网站][6]。无需解释,请复制并粘贴以下命令: ``` sudo rb-site install --noinput \ - --domain-name=localhost --db-type=sqlite3 \ - --db-name=/var/www/rev.local/data/reviewboard.db \ - --admin-user=rbadmin --admin-password=secret \ - /var/www/rev.local + --domain-name=localhost --db-type=sqlite3 \ + --db-name=/var/www/rev.local/data/reviewboard.db \ + --admin-user=rbadmin --admin-password=secret \ + /var/www/rev.local sudo chown -R apache /var/www/rev.local/htdocs/media/uploaded \ - /var/www/rev.local/data + /var/www/rev.local/data sudo ln -s /var/www/rev.local/conf/apache-wsgi.conf \ - /etc/httpd/conf.d/reviewboard-localhost.conf + /etc/httpd/conf.d/reviewboard-localhost.conf sudo setsebool -P httpd_can_sendmail=1 httpd_can_network_connect=1 \ - httpd_can_network_memcache=1 httpd_unified=1 + httpd_can_network_memcache=1 httpd_unified=1 sudo systemctl enable --now httpd ``` @@ -131,7 +131,7 @@ via: https://fedoramagazine.org/working-modules-fedora-28/ 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://fedoramagazine.org/author/merlinm/ -[1]:https://fedoramagazine.org/modularity-fedora-28-server-edition/ +[1]:https://linux.cn/article-10479-1.html [2]:https://getfedora.org/server/ [3]:https://fedoramagazine.org/howto-use-sudo/ [4]:https://fedoramagazine.org/modularity-fedora-28-server-edition/#comment-476696 From 9e474c5f0feee1eb6c4d6e206c16716c77d8ae71 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 20:54:23 +0800 Subject: [PATCH 025/164] TSD:20190120 Get started with HomeBank, an open source personal finance app.md @wxy --- .../tech/20190118 Top 5 Linux Server Distributions.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20190118 Top 5 Linux Server Distributions.md (100%) diff --git a/sources/tech/20190118 Top 5 Linux Server Distributions.md b/translated/tech/20190118 Top 5 Linux Server Distributions.md similarity index 100% rename from sources/tech/20190118 Top 5 Linux Server Distributions.md rename to translated/tech/20190118 Top 5 Linux Server Distributions.md From 1f6daa8df96978ee367137e3d090bdf4e28d8a2d Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sun, 27 Jan 2019 19:59:21 +0800 Subject: [PATCH 026/164] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?20181203=20How=20to=20bring=20good...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ing good fortune to your Linux terminal.md | 86 ------------------- ...ing good fortune to your Linux terminal.md | 86 +++++++++++++++++++ 2 files changed, 86 insertions(+), 86 deletions(-) delete mode 100644 sources/tech/20181203 How to bring good fortune to your Linux terminal.md create mode 100644 translated/tech/20181203 How to bring good fortune to your Linux terminal.md diff --git a/sources/tech/20181203 How to bring good fortune to your Linux terminal.md b/sources/tech/20181203 How to bring good fortune to your Linux terminal.md deleted file mode 100644 index 28bd2996a1..0000000000 --- a/sources/tech/20181203 How to bring good fortune to your Linux terminal.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: subject: (How to bring good fortune to your Linux terminal) -[#]: via: (https://opensource.com/article/18/12/linux-toy-fortune) -[#]: author: (Jason Baker https://opensource.com/users/jason-baker) -[#]: url: ( ) - -How to bring good fortune to your Linux terminal -====== -Bring quotes and quips to the command line with the fortune utility. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-fortune.png?itok=5PVVZVer) - -It's December, and if you haven't found a [tech advent calendar][1] that sparks your fancy yet, well, maybe this one will do the trick. Every day, from now to the 24th, we're bringing you a different Linux command-line toy. What's a command-line toy, you ask? It could be a game or any simple diversion to bring a little happiness to your terminal. - -You may have seen some of these before. We hope you'll find something new, too. Either way, we hope you have fun following along. - -Today's toy, **fortune** , is an old one. Versions of it date back to the 1980s when it was included with Unix. The version I installed in Fedora was available under a BSD license, and I grabbed it with the following. - -``` -$ sudo dnf install fortune-mod -y -``` - -Your distribution may be different. On some, you may need to install the fortunes separately from **fortune** itself (try searching your package manager for "fortunes*"). You can also check out the source code on [GitHub][2]. Then, just run **fortune** to get, well, a fortune. - -``` -$ fortune -"Time is an illusion.  Lunchtime doubly so." --- Ford Prefect, _Hitchhiker's Guide to the Galaxy_ -``` - -So why do you need fortunes at the terminal? For fun, of course. Perhaps you'd like to add them to the message of the day on your system? - -Personally, I like using the **fortune** command as a built-in piece of dummy data when I'm using the terminal to parse text, particularly with [regular expressions][3], and want something simple to try it out on. - -For example, let's say I was testing our a transformation with the **tr** command to replace letter the letter e with a numeral 3. - -``` -$ fortune | tr 'eE' '3' -Unix 3xpr3ss: -All pass3ng3r bring a pi3c3 of th3 a3roplan3 and a box of tools with th3m to -th3 airport. Th3y gath3r on th3 tarmac, arguing constantly about what kind -of plan3 th3y want to build and how to put it tog3th3r. 3v3ntually, th3 -pass3ng3rs split into groups and build s3v3ral diff3r3nt aircraft, but giv3 -th3m all th3 sam3 nam3. Som3 pass3ng3rs actually r3ach th3ir d3stinations. -All pass3ng3rs b3li3v3 th3y got th3r3. -``` - -So what fortunes come with your distribution? Take a look in your **/usr/share/games/fortune** directory to find them all. Here are a few of my favorites. - -``` -Never laugh at live dragons. -                -- Bilbo Baggins [J.R.R. Tolkien, "The Hobbit"] - -I dunno, I dream in Perl sometimes... -             -- Larry Wall in  <8538@jpl-devvax.JPL.NASA.GOV> - -I have an existential map.  It has "You are here" written all over it. -                -- Steven Wright -``` - -Looking for more on **fortune**? You can, of course, always check out the man page to learn more about the options, or read a little bit more about the history of the command on [Wikipedia][4]. - -Do you have a favorite command-line toy that you think I ought to profile? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end. - -Check out yesterday's toy, [Drive a locomotive through your Linux terminal][5], and check back tomorrow for another! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/12/linux-toy-fortune - -作者:[Jason Baker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jason-baker -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/article/16/11/7-tech-advent-calendars-holiday-season -[2]: https://github.com/shlomif/fortune-mod -[3]: https://opensource.com/article/18/5/getting-started-regular-expressions -[4]: https://en.wikipedia.org/wiki/Fortune_%28Unix%29 -[5]: https://opensource.com/article/18/12/linux-toy-sl diff --git a/translated/tech/20181203 How to bring good fortune to your Linux terminal.md b/translated/tech/20181203 How to bring good fortune to your Linux terminal.md new file mode 100644 index 0000000000..19d703afab --- /dev/null +++ b/translated/tech/20181203 How to bring good fortune to your Linux terminal.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: subject: (How to bring good fortune to your Linux terminal) +[#]: via: (https://opensource.com/article/18/12/linux-toy-fortune) +[#]: author: (Jason Baker https://opensource.com/users/jason-baker) +[#]: url: ( ) + +如何为你的 Linux 终端带来好运 +====== +使用 fortune 实用程序将引号和俏皮话带到命令行。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-fortune.png?itok=5PVVZVer) + +这是 12 月,如果你还没有找到一款能激发你灵感的[科技降临节日历][1],那么,也许这个系列可以。从现在到 24 日,每天我们都会为你带来一个不同的 Linux 命令行玩具。你可能会问,什么是命令行玩具?它可能是一个游戏或任何简单的娱乐,为你的终端带来一点点快乐。 + +你可能之前已经看过其中的一些,我们希望你也能发现一些新的东西。不管怎样,我们都希望你在关注时保有乐趣。 + +今天的玩具是 **fortune**,它很古老。它的版本可以追溯到 1980 年,当时它包含在 Unix 中。我在 Fedora 中安装的版本是在 BSD 许可下提供的,我可以使用以下命令获取它。 +``` +$ sudo dnf install fortune-mod -y +``` + +你的发行版可能会有所不同。在某些情况下,你可能需要将 fortunes 独立于 **fortune** 本身安装(尝试在你的包管理器中搜索 "fortunes")。你还可以在 [GitHub][2] 上查看它的源代码,然后,只需运行 **fortune** 即可获得好运。 + +``` +$ fortune +"Time is an illusion.  Lunchtime doubly so." +-- Ford Prefect, _Hitchhiker's Guide to the Galaxy_ +``` + +那么,你为什么会在终端上需要 fortune 呢?当然是为了好玩啦。也许你想将它们添加到系统上的每天消息中? + +就我个人而言,当我使用终端来解析文本时,我喜欢使用 **fortune** 命令作为一段内置的虚拟数据,特别是使用[正则表达式][3]时,我想要一些简单的东西来尝试一下。 + +例如,假设我使用 **tr** 命令来测试转换,用数字 3 替换字母 e。 + +``` +$ fortune | tr 'eE' '3' +Unix 3xpr3ss: +All pass3ng3r bring a pi3c3 of th3 a3roplan3 and a box of tools with th3m to +th3 airport. Th3y gath3r on th3 tarmac, arguing constantly about what kind +of plan3 th3y want to build and how to put it tog3th3r. 3v3ntually, th3 +pass3ng3rs split into groups and build s3v3ral diff3r3nt aircraft, but giv3 +th3m all th3 sam3 nam3. Som3 pass3ng3rs actually r3ach th3ir d3stinations. +All pass3ng3rs b3li3v3 th3y got th3r3. +``` + +那么 fortunes 到底为你的发行版带来了什么呢?看看你的 **/usr/share/games/fortune** 目录,找到它们。以下我最喜欢的几个。 +``` +Never laugh at live dragons. +                -- Bilbo Baggins [J.R.R. Tolkien, "The Hobbit"] + +I dunno, I dream in Perl sometimes... +             -- Larry Wall in  <8538@jpl-devvax.JPL.NASA.GOV> + +I have an existential map.  It has "You are here" written all over it. +                -- Steven Wright +``` + +想要了解更多关于 **fortune**?当然,你可以经常查看 man 页来了解更多选项,或者在[维基百科][4]上阅读更多关于此命令的历史信息。 + +你有特别喜欢的命令行小玩具需要我介绍的吗?这个系列要介绍的小玩具大部分已经有了落实,但还预留了几个空位置。请在评论区留言,我会查看的。如果还有空位置,我会考虑介绍它的。如果没有,但如果我得到了一些很好的意见,我会在最后做一些有价值的提及。 + +看看昨天的玩具:[驾驶火车头通过你的 Linux 终端][5]。记得明天再来! + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/linux-toy-fortune + +作者:[Jason Baker][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jason-baker +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/article/16/11/7-tech-advent-calendars-holiday-season +[2]: https://github.com/shlomif/fortune-mod +[3]: https://opensource.com/article/18/5/getting-started-regular-expressions +[4]: https://en.wikipedia.org/wiki/Fortune_%28Unix%29 +[5]: https://opensource.com/article/18/12/linux-toy-sl From 68fb5efd01a9f10bd917f5eb315901c6b2294348 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 21:45:16 +0800 Subject: [PATCH 027/164] APL:20190118 Get started with WTF, a dashboard for the terminal --- ...190118 Get started with WTF, a dashboard for the terminal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md b/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md index 822cd8b7e8..55e2ee93fa 100644 --- a/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md +++ b/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b9773d230c8e3e7cad307a5becf6d8e211b72f5c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 23:23:38 +0800 Subject: [PATCH 028/164] TSD:20190118 Get started with WTF, a dashboard for the terminal.md --- ... with WTF, a dashboard for the terminal.md | 90 ------------------ ... with WTF, a dashboard for the terminal.md | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 90 deletions(-) delete mode 100644 sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md create mode 100644 translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md diff --git a/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md b/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md deleted file mode 100644 index 55e2ee93fa..0000000000 --- a/sources/tech/20190118 Get started with WTF, a dashboard for the terminal.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get started with WTF, a dashboard for the terminal) -[#]: via: (https://opensource.com/article/19/1/wtf-information-dashboard) -[#]: author: (Kevein Sonney https://opensource.com/users/ksonney) - -Get started with WTF, a dashboard for the terminal -====== -Keep key information in view with WTF, the sixth in our series on open source tools that will make you more productive in 2019. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr) - -There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. - -Here's the sixth of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. - -### WTF - -Once upon a time, I was doing some consulting at a firm that used [Bloomberg Terminals][1] . My reaction was, "Wow, that's WAY too much information on one screen." These days, however, it seems like I can't get enough information on a screen when I'm working and have multiple web pages, dashboards, and console apps open to try to keep track of things. - -While [tmux][2] and [Screen][3] can do split screens and multiple windows, they are a pain to set up, and the keybindings can take a while to learn (and often conflict with other applications). - -[WTF][4] is a simple, easily configured information dashboard for the terminal. It is written in [Go][5], uses a YAML configuration file, and can pull data from several different sources. All the data sources are contained in [modules][6] and include things like weather, issue trackers, date and time, Google Sheets, and a whole lot more. Some panes are interactive, and some just update with the most recent information available. - -Setup is as easy as downloading the latest release for your operating system and running the command. Since it is written in Go, it is very portable and should run anywhere you can compile it (although the developer only builds for Linux and MacOS at this time). - -![](https://opensource.com/sites/default/files/uploads/wtf-1.png) - -When you run WTF for the first time, you'll get the default screen, identical to the image above. - -![](https://opensource.com/sites/default/files/uploads/wtf-2.png) - -You also get the default configuration file in **~/.wtf/config.yml** , and you can edit the file to suit your needs. The grid layout is configured in the top part of the file. - -``` -grid: -  columns: [45, 45] -  rows: [7, 7, 7, 4] -``` - -The numbers in the grid settings represent the character dimensions of each block. The default configuration is two columns of 40 characters, two rows 13 characters tall, and one row 4 characters tall. In the code above, I made the columns wider (45, 45), the rows smaller, and added a fourth row so I can have more widgets. - -![](https://opensource.com/sites/default/files/uploads/wtf-3.png) - -I like to see the day's weather on my dashboard. There are two weather modules to chose from: [Weather][7], which shows just the text information, and [Pretty Weather][8], which is colorful and uses text-based graphics in the display. - -``` -prettyweather: -  enabled: true -  position: -    top: 0 -    left: 1 -    height: 2 -    width: 1 -``` - -This code creates a pane two blocks tall (height: 2) and one block wide (height: 1), positioned on the second column (left: 1) on the top row (top: 0) containing the Pretty Weather module. - -Some modules, like Jira, GitHub, and Todo, are interactive, and you can scroll, update, and save information in them. You can move between the interactive panes using the Tab key. The \ key brings up a help screen for the active pane so you can see what you can do and how. The Todo module lets you add, edit, and delete to-do items, as well as check them off as you complete them. - -![](https://opensource.com/sites/default/files/uploads/wtf-4.png) - -There are also modules to execute commands and present the output, watch a text file, and monitor build and integration server output. All the documentation is very well done. - -WTF is a valuable tool for anyone who needs to see a lot of data on one screen from different sources. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/wtf-information-dashboard - -作者:[Kevein Sonney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ksonney -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Bloomberg_Terminal -[2]: https://github.com/tmux/tmux -[3]: https://www.gnu.org/software/screen/ -[4]: https://wtfutil.com/ -[5]: https://golang.org/ -[6]: https://wtfutil.com/posts/modules/ -[7]: https://wtfutil.com/posts/modules/weather/ -[8]: https://wtfutil.com/posts/modules/prettyweather/ diff --git a/translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md b/translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md new file mode 100644 index 0000000000..5bb1d135af --- /dev/null +++ b/translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md @@ -0,0 +1,91 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with WTF, a dashboard for the terminal) +[#]: via: (https://opensource.com/article/19/1/wtf-information-dashboard) +[#]: author: (Kevein Sonney https://opensource.com/users/ksonney) + +开始使用 WTF 吧,一款终端仪表板 +====== + +> 使用 WTF 将关键信息置于视野之中,这个系列中第六个开源工具可使你在 2019 年更有工作效率。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr) + +每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。 + +这是我挑选出的 19 个新的(或者对你而言新的)开源项目来帮助你在 2019 年更有效率。 + +### WTF + +曾几何时,我在一家使用[彭博终端][1]的公司做咨询。我的反应是,“哇,在一个屏幕上显示的信息太多了。” 然而,现在,当我正在工作并且打开多个网页、仪表板和控制台应用程序以试图跟踪事物时,我似乎无法在屏幕上获得足够的信息。 + +虽然 [tmux][2] 和 [Screen][3] 可以进行分屏和打开多个窗口,但它们很难设置,并且它们的键绑定可能需要一段时间才能学会(还经常与其他应用程序冲突)。 + +[WTF][4] 是一个简单的、易于配置的终端信息仪表板。它是用 [Go][5] 语言编写的,使用 YAML 配置文件,可以从几个不同的源提取数据。所有的数据源都包含在[模块][6]中,包括天气、问题跟踪器、日期和时间、Google 表格以及更多内容。有些窗格是交互式的,有些窗格只是使用最新的信息进行更新。 + +安装它就像下载适用于您的操作系统的最新版本并运行命令一样简单。因为它是用 Go 编写的,所以它的移植性很好,应该可以在任何可以编译它的地方运行(尽管开发人员目前只为 Linux 和 MacOS 做了构建)。 + +![](https://opensource.com/sites/default/files/uploads/wtf-1.png) + +当您第一次运行 WTF 时,您将看到如上图的默认屏幕。 + +![](https://opensource.com/sites/default/files/uploads/wtf-2.png) + +其默认配置文件在 `~/.wtf/config.yml`,您可以编辑该文件以满足您的需要。网格布局的配置在文件的顶部。 + +``` +grid: +  columns: [45, 45] +  rows: [7, 7, 7, 4] +``` + +网格设置中的数字表示每个块的字符尺寸。默认配置是两列,每列 40 个字符,两行 13 个字符高,一行 4 个字符高。在上面的代码中,我使列更宽(`45,45`),行更小,并添加了第四行,所以我可以放更多的小部件。 + +![](https://opensource.com/sites/default/files/uploads/wtf-3.png) + +我喜欢在仪表板上看到当天的天气。有两个天气模块可供选择:[Weather][7],它只显示文本信息;[Pretty Weather][8] 则色彩丰富,并使用基于文本的图形显示。 + +``` +prettyweather: +  enabled: true +  position: +    top: 0 +    left: 1 +    height: 2 +    width: 1 +``` + +此代码创建了一个窗格,高为两个块(`height: 2`),宽为一个块(`width: 1`),位于顶行(`top: 0`)的第二列(`left: 1`)上,包含 Pretty Weather 模块. + +一些模块是交互式的,如 Jira、GitHub 和 Todo,您可以在其中滚动、更新和保存信息。您可以使用 Tab 键在交互式窗格之间移动。`\` 键会显示活动窗格的帮助屏幕,以便您可以查看可以执行的操作以及操作方式。Todo 模块允许您添加、编辑和删除待办事项,并在完成后勾掉它们。 + +![](https://opensource.com/sites/default/files/uploads/wtf-4.png) + +还有一些模块可以执行命令并显示输出、监视文本文件,以及监视构建和集成服务器的输出。所有文档都做得很好。 + +对于需要在不同来源的一个屏幕上查看大量数据的人来说,WTF 是一个有价值的工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/wtf-information-dashboard + +作者:[Kevein Sonney][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Bloomberg_Terminal +[2]: https://github.com/tmux/tmux +[3]: https://www.gnu.org/software/screen/ +[4]: https://wtfutil.com/ +[5]: https://golang.org/ +[6]: https://wtfutil.com/posts/modules/ +[7]: https://wtfutil.com/posts/modules/weather/ +[8]: https://wtfutil.com/posts/modules/prettyweather/ From b555c287567dc26b01b36e76352650bff922e18d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 27 Jan 2019 23:37:09 +0800 Subject: [PATCH 029/164] PUB:20190118 Get started with WTF, a dashboard for the terminal.md @wxy https://linux.cn/article-10484-1.html --- ... Get started with WTF, a dashboard for the terminal.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename {translated/tech => published}/20190118 Get started with WTF, a dashboard for the terminal.md (97%) diff --git a/translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md b/published/20190118 Get started with WTF, a dashboard for the terminal.md similarity index 97% rename from translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md rename to published/20190118 Get started with WTF, a dashboard for the terminal.md index 5bb1d135af..c7da18b982 100644 --- a/translated/tech/20190118 Get started with WTF, a dashboard for the terminal.md +++ b/published/20190118 Get started with WTF, a dashboard for the terminal.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10484-1.html) [#]: subject: (Get started with WTF, a dashboard for the terminal) [#]: via: (https://opensource.com/article/19/1/wtf-information-dashboard) [#]: author: (Kevein Sonney https://opensource.com/users/ksonney) @@ -75,7 +75,7 @@ via: https://opensource.com/article/19/1/wtf-information-dashboard 作者:[Kevein Sonney][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e7c84daf3fbbd59b3075a439c20b26fa8f158973 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 28 Jan 2019 08:51:55 +0800 Subject: [PATCH 030/164] translated --- ...The Linux terminal is no one-trick pony.md | 66 ------------------- ...The Linux terminal is no one-trick pony.md | 66 +++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-) delete mode 100644 sources/tech/20181214 The Linux terminal is no one-trick pony.md create mode 100644 translated/tech/20181214 The Linux terminal is no one-trick pony.md diff --git a/sources/tech/20181214 The Linux terminal is no one-trick pony.md b/sources/tech/20181214 The Linux terminal is no one-trick pony.md deleted file mode 100644 index 56b7711659..0000000000 --- a/sources/tech/20181214 The Linux terminal is no one-trick pony.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Linux terminal is no one-trick pony) -[#]: via: (https://opensource.com/article/18/12/linux-toy-ponysay) -[#]: author: (Jason Baker https://opensource.com/users/jason-baker) - -The Linux terminal is no one-trick pony -====== -Bring the magic of My Little Pony to your Linux command line. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-ponysay.png?itok=ehl6pTr_) - -Welcome to another day of the Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself what a command-line toy even is. We’re figuring that out as we go, but generally, it could be a game, or any simple diversion that helps you have fun at the terminal. - -Some of you will have seen various selections from our calendar before, but we hope there’s at least one new thing for everyone. - -Reader [Lori][1] made the suggestion of today's toy in a comment on my previous article on [cowsay][2]: - -"Hmmm, I've been playing with something called ponysay which seems to be a full-color variant on your cowsay." - -Intrigued, I had to check it out, and I was not disappointed with what I found. - -In a nutshell, **[ponysay][3]** is exactly that: a rewrite of **cowsay** that includes many full-color characters from [My Little Pony][4], that you can use to output phrases at the Linux command line. It's actually a really well-done project, that features over 400 characters and character combinations, and is incredibly well documented in a [78-page PDF][5] covering full usage. - -To install **ponysay** , you'll want to check out the project [README][6] to select the installation method that works best for your distribution and situation. Since ponysay didn't appear to be packaged for my distribution, Fedora, I opted to try out the Docker container image, but do what works best for you; installation from source may also work for you. - -I was curious to try out [**podman**][7] as a drop-in replacement for **docker** for a casual container users, and for me at least, it just worked! - -``` -$ podman run -ti --rm mpepping/ponysay 'Ponytastic' -``` - -The outputs are amazing, and I challenge you to try it out and let me know your favorite. Here was one of mine: - -![](https://opensource.com/sites/default/files/uploads/linux-toy-ponysay-output.png) - -It's developers chose to write the code in [Pony][8]! (Update: Sadly, I was wrong about this. It's written in Python, though GitHub believes it to be Pony because of the file extensions.) Ponysay is licensed under the GPL version 3, and you can pick up its source code [on GitHub][3]. - -Do you have a favorite command-line toy that you think I ought to profile? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end. - -Check out yesterday's toy, [Relax by the fire at your Linux terminal][9], and check back tomorrow for another! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/12/linux-toy-ponysay - -作者:[Jason Baker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jason-baker -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/users/n8chz -[2]: https://opensource.com/article/18/12/linux-toy-cowsay -[3]: https://github.com/erkin/ponysay -[4]: https://en.wikipedia.org/wiki/My_Little_Pony -[5]: https://github.com/erkin/ponysay/blob/master/ponysay.pdf?raw=true -[6]: https://github.com/erkin/ponysay/blob/master/README.md -[7]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers -[8]: https://opensource.com/article/18/5/pony -[9]: https://opensource.com/article/18/12/linux-toy-aafire diff --git a/translated/tech/20181214 The Linux terminal is no one-trick pony.md b/translated/tech/20181214 The Linux terminal is no one-trick pony.md new file mode 100644 index 0000000000..c33a8b0e85 --- /dev/null +++ b/translated/tech/20181214 The Linux terminal is no one-trick pony.md @@ -0,0 +1,66 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The Linux terminal is no one-trick pony) +[#]: via: (https://opensource.com/article/18/12/linux-toy-ponysay) +[#]: author: (Jason Baker https://opensource.com/users/jason-baker) + +Linux 终端能做其他事 +====== +将小马宝莉的魔力带到终端 +![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-ponysay.png?itok=ehl6pTr_) + +欢迎再次来到 Linux 命令行玩具日历。如果这是你第一次访问该系列,你甚至可能会问自己什么是命令行玩具。我们正在思考中,但一般来说,它可能是一个游戏,或任何简单的消遣,可以帮助你在终端玩得开心。 + +很可能你们中的一些人之前已经看过我们日历中的各种玩具,但我们希望每个人至少见到一件新事物。 + +读者 [Lori][1] 在我之前关于 [cowsay][2] 的文章的评论中提出了今天玩具的建议: + +“嗯,我一直在玩一个叫 ponysay 的东西,它似乎是你的 cowsay 的彩色变种。” + +我对此感到好奇,并去看了一下,发现没有让我失望。 + +简而言之,**[ponysay][3]** 的 **cowsay**的重写,它包括了来自[小马宝莉][4]中的许多全彩色人物,你可以用它在 Linux 命令行输出短句。它实际上是一个非常完善的项目,拥有超过 400 个字符和字符组合,它还有让人难以置信的的[ 78 页的 PDF 文档][5]涵盖了了所有的用法。 + +要安装 **ponysay**,你需要查看项目的 [README][6] 来选择最适合你的发行版和情况的安装方法。由于 ponysay 似乎没有为我的 Fedora 发行版打包,我选择试用 Docker 容器镜像,但你可以选择最适合你的方法。从源码安装可能也适合你。 + +作为一个业余容器用户,我很想试试 [**podman**][7] 来代替 **docker**。至少对于我而言,它可以正常工作。 + +``` +$ podman run -ti --rm mpepping/ponysay 'Ponytastic' +``` + +输出很神奇,我建议你也试下,然后告诉我你最喜欢的。这是我其中一个: + +![](https://opensource.com/sites/default/files/uploads/linux-toy-ponysay-output.png) + +它的开发人员选择用 [Pony][8] 来编写代码。(更新:很遗憾我写错了。虽然 Gihutb 根据它的文件扩展名认为它是 Pony,但是它是用 Python 写的。)Ponysay 使用 GPLv3 许可,你可以在 [GitHub][3] 中获取它的源码。 + +你有特别喜欢的命令行小玩具需要我介绍的吗?这个系列要介绍的小玩具大部分已经有了落实,但还预留了几个空位置。如果你有特别想了解的可以评论留言,我会查看的。如果还有空位置,我会考虑介绍它的。如果没有,但如果我得到了一些很好的意见,我会在最后做一些有价值的提及。 + +查看昨天的玩具,[在 Linux 终端中用火焰放松][9],记得明天再来! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/linux-toy-ponysay + +作者:[Jason Baker][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jason-baker +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/users/n8chz +[2]: https://opensource.com/article/18/12/linux-toy-cowsay +[3]: https://github.com/erkin/ponysay +[4]: https://en.wikipedia.org/wiki/My_Little_Pony +[5]: https://github.com/erkin/ponysay/blob/master/ponysay.pdf?raw=true +[6]: https://github.com/erkin/ponysay/blob/master/README.md +[7]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers +[8]: https://opensource.com/article/18/5/pony +[9]: https://opensource.com/article/18/12/linux-toy-aafire From 5901202d1d4517ecbe92503b9db4735f22bcd493 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 28 Jan 2019 08:55:18 +0800 Subject: [PATCH 031/164] translating --- ...tarted with HomeBank, an open source personal finance app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md b/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md index 0c905c86f5..a925448cfb 100644 --- a/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md +++ b/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 648ae2536ed5b84a899e64238a1b07e26c357281 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 12:03:46 +0800 Subject: [PATCH 032/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190127=20Get=20?= =?UTF-8?q?started=20with=20eDEX-UI,=20a=20Tron-influenced=20terminal=20pr?= =?UTF-8?q?ogram=20for=20tablets=20and=20desktops=20sources/tech/20190127?= =?UTF-8?q?=20Get=20started=20with=20eDEX-UI,=20a=20Tron-influenced=20term?= =?UTF-8?q?inal=20program=20for=20tablets=20and=20desktops.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...rminal program for tablets and desktops.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md diff --git a/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md b/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md new file mode 100644 index 0000000000..f181f4ebd1 --- /dev/null +++ b/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-edex-ui) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops +====== +Make work more fun with eDEX-UI, the 15th in our series on open source tools that will make you more productive in 2019. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 15th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### eDEX-UI + +I was 11 years old when [Tron][1] was in movie theaters. I cannot deny that, despite the fantastical nature of the film, it had an impact on my career choice later in life. + +![](https://opensource.com/sites/default/files/uploads/edex-ui-1.png) + +[eDEX-UI][2] is a cross-platform terminal program designed for tablets and desktops that was inspired by the user interface in Tron. It has five terminals in a tabbed interface, so it is easy to switch between tasks, as well as useful displays of system information. + +At launch, eDEX-UI goes through a boot sequence with information about the ElectronJS system it is based on. After the boot, eDEX-UI shows system information, a file browser, a keyboard (for tablets), and the main terminal tab. The other four tabs (labeled EMPTY) don't have anything loaded and will start a shell when you click on one. The default shell in eDEX-UI is Bash (if you are on Windows, you will likely have to change it to either PowerShell or cmd.exe). + +![](https://opensource.com/sites/default/files/uploads/edex-ui-2.png) + +Changing directories in the file browser will change directories in the active terminal and vice-versa. The file browser does everything you'd expect, including opening associated applications when you click on a file. The one exception is eDEX-UI's settings.json file (in .config/eDEX-UI by default), which opens the configuration editor instead. This allows you to set the shell command for the terminals, change the theme, and modify several other settings for the user interface. Themes are also stored in the configuration directory and, since they are also JSON files, creating a custom theme is pretty straightforward. + +![](https://opensource.com/sites/default/files/uploads/edex-ui-3.png) + +eDEX-UI allows you to run five terminals with full emulation. The default terminal type is xterm-color, meaning it has full-color support. One thing to be aware of is that the keys light up on the keyboard while you type, so if you're using eDEX-UI on a tablet, the keyboard could present a security risk in environments where people can see the screen. It is better to use a theme without the keyboard on those devices, although it does look pretty cool when you are typing. + +![](https://opensource.com/sites/default/files/uploads/edex-ui-4.png) + +While eDEX-UI supports only five terminal windows, that has been more than enough for me. On a tablet, eDEX-UI gives me that cyberspace feel without impacting my productivity. On a desktop, eDEX-UI allows all of that and lets me look cool in front of my co-workers. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-edex-ui + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Tron +[2]: https://github.com/GitSquared/edex-ui From 03c1561b44b4723cd079d01ce565cd39cc6ff023 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 12:06:04 +0800 Subject: [PATCH 033/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190123=20GStrea?= =?UTF-8?q?mer=20WebRTC:=20A=20flexible=20solution=20to=20web-based=20medi?= =?UTF-8?q?a=20sources/tech/20190123=20GStreamer=20WebRTC-=20A=20flexible?= =?UTF-8?q?=20solution=20to=20web-based=20media.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... A flexible solution to web-based media.md | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 sources/tech/20190123 GStreamer WebRTC- A flexible solution to web-based media.md diff --git a/sources/tech/20190123 GStreamer WebRTC- A flexible solution to web-based media.md b/sources/tech/20190123 GStreamer WebRTC- A flexible solution to web-based media.md new file mode 100644 index 0000000000..bb7e129ff3 --- /dev/null +++ b/sources/tech/20190123 GStreamer WebRTC- A flexible solution to web-based media.md @@ -0,0 +1,108 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GStreamer WebRTC: A flexible solution to web-based media) +[#]: via: (https://opensource.com/article/19/1/gstreamer) +[#]: author: (Nirbheek Chauhan https://opensource.com/users/nirbheek) + +GStreamer WebRTC: A flexible solution to web-based media +====== +GStreamer's WebRTC implementation eliminates some of the shortcomings of using WebRTC in native apps, server applications, and IoT devices. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe) + +Currently, [WebRTC.org][1] is the most popular and feature-rich WebRTC implementation. It is used in Chrome and Firefox and works well for browsers, but the Native API and implementation have several shortcomings that make it a less-than-ideal choice for uses outside of browsers, including native apps, server applications, and internet of things (IoT) devices. + +Last year, our company ([Centricular][2]) made an independent implementation of a Native WebRTC API available in GStreamer 1.14. This implementation is much easier to use and more flexible than the WebRTC.org Native API, is transparently compatible with WebRTC.org, has been tested with all browsers, and is already in production use. + +### What are GStreamer and WebRTC? + +[GStreamer][3] is an open source, cross-platform multimedia framework and one of the easiest and most flexible ways to implement any application that needs to play, record, or transform media-like data across a diverse scale of devices and products, including embedded (IoT, in-vehicle infotainment, phones, TVs, etc.), desktop (video/music players, video recording, non-linear editing, video conferencing, [VoIP][4] clients, browsers, etc.), servers (encode/transcode farms, video/voice conferencing servers, etc.), and [more][5]. + +The main feature that makes GStreamer the go-to multimedia framework for many people is its pipeline-based model, which solves one of the hardest problems in API design: catering to applications of varying complexity; from the simplest one-liners and quick solutions to those that need several hundreds of thousands of lines of code to implement their full feature set. If you want to learn how to use GStreamer, [Jan Schmidt's tutorial][6] from [LCA 2018][7] is a good place to start. + +[WebRTC][8] is a set of draft specifications that build upon existing [RTP][9], [RTCP][10], [SDP][11], [DTLS][12], [ICE][13], and other real-time communication (RTC) specifications and define an API for making them accessible using browser JavaScript (JS) APIs. + +People have been doing real-time communication over [IP][14] for [decades][15] with the protocols WebRTC builds upon. WebRTC's real innovation was creating a bridge between native applications and web apps by defining a standard yet flexible API that browsers can expose to untrusted JavaScript code. + +These specifications are [constantly being improved][16], which, combined with the ubiquitous nature of browsers, means WebRTC is fast becoming the standard choice for video conferencing on all platforms and for most applications. + +### **Everything is great, let's build amazing apps!** + +Not so fast, there's more to the story! For web apps, the [PeerConnection API][17] is [everywhere][18]. There are some browser-specific quirks, and the API keeps changing, but the [WebRTC JS adapter][19] handles most of that. Overall, the web app experience is mostly 👍. + +Unfortunately, for native code or applications that need more flexibility than a sandboxed JavaScript app can achieve, there haven't been a lot of great options. + +[Libwebrtc][20] (Google's implementation), [Janus][21], [Kurento][22], and [OpenWebRTC][23] have traditionally been the main contenders, but each implementation has its own inflexibilities, shortcomings, and constraints. + +Libwebrtc is still the most mature implementation, but it is also the most difficult to work with. Since it's embedded inside Chrome, it's a moving target and the project [is quite difficult to build and integrate][24]. These are all obstacles for native or server app developers trying to quickly prototype and experiment with things. + +Also, WebRTC was not built for multimedia, so the lower layers get in the way of non-browser use cases and applications. It is quite painful to do anything other than the default "set raw media, transmit" and "receive from remote, get raw media." This means if you want to use your own filters or hardware-specific codecs or sinks/sources, you end up having to fork libwebrtc. + +[**OpenWebRTC**][23] by Ericsson was the first attempt to rectify this situation. It was built on top of GStreamer. Its target audience was app developers, and it fit the bill quite well as a proof of concept—even though it used a custom API and some of the architectural decisions made it quite inflexible for most other uses. However, after an initial flurry of activity around the project, momentum petered out, the project failed to gather a community, and it is now effectively dead. Full disclosure: Centricular worked with Ericsson to polish some of the rough edges around the project immediately prior to its public release. + +### WebRTC in GStreamer + +GStreamer's WebRTC implementation gives you full control, as it does with any other [GStreamer pipeline][25]. + +As we said, the WebRTC standards build upon existing standards and protocols that serve similar purposes. GStreamer has supported almost all of them for a while now because they were being used for real-time communication, live streaming, and many other IP-based applications. This led Ericsson to choose GStreamer as the base for its OpenWebRTC project. + +Combined with the [SRTP][26] and DTLS plugins that were written during OpenWebRTC's development, it means that the implementation is built upon a solid and well-tested base, and implementing WebRTC features does not involve as much code-from-scratch work as one might presume. However, WebRTC is a large collection of standards, and reaching feature-parity with libwebrtc is an ongoing task. + +Due to decisions made while architecting WebRTCbin's internals, the API follows the PeerConnection specification quite closely. Therefore, almost all its missing features involve writing code that would plug into clearly defined sockets. For instance, since the GStreamer 1.14 release, the following features have been added to the WebRTC implementation and will be available in the next release of the GStreamer WebRTC: + + * Forward error correction + * RTP retransmission (RTX) + * RTP BUNDLE + * Data channels over SCTP + + + +We believe GStreamer's API is the most flexible, versatile, and easy to use WebRTC implementation out there, and it will only get better as time goes by. Bringing the power of pipeline-based multimedia manipulation to WebRTC opens new doors for interesting, unique, and highly efficient applications. If you'd like to demo the technology and play with the code, build and run [these demos][27], which include C, Rust, Python, and C# examples. + +Matthew Waters will present [GStreamer WebRTC—The flexible solution to web-based media][28] at [linux.conf.au][29], January 21-25 in Christchurch, New Zealand. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/gstreamer + +作者:[Nirbheek Chauhan][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nirbheek +[b]: https://github.com/lujun9972 +[1]: http://webrtc.org/ +[2]: https://www.centricular.com/ +[3]: https://gstreamer.freedesktop.org/documentation/application-development/introduction/gstreamer.html +[4]: https://en.wikipedia.org/wiki/Voice_over_IP +[5]: https://wiki.ligo.org/DASWG/GstLAL +[6]: https://www.youtube.com/watch?v=ZphadMGufY8 +[7]: http://lca2018.linux.org.au/ +[8]: https://en.wikipedia.org/wiki/WebRTC +[9]: https://en.wikipedia.org/wiki/Real-time_Transport_Protocol +[10]: https://en.wikipedia.org/wiki/RTP_Control_Protocol +[11]: https://en.wikipedia.org/wiki/Session_Description_Protocol +[12]: https://en.wikipedia.org/wiki/Datagram_Transport_Layer_Security +[13]: https://en.wikipedia.org/wiki/Interactive_Connectivity_Establishment +[14]: https://en.wikipedia.org/wiki/Internet_Protocol +[15]: https://en.wikipedia.org/wiki/Session_Initiation_Protocol +[16]: https://datatracker.ietf.org/wg/rtcweb/documents/ +[17]: https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection +[18]: https://caniuse.com/#feat=rtcpeerconnection +[19]: https://github.com/webrtc/adapter +[20]: https://github.com/aisouard/libwebrtc +[21]: https://janus.conf.meetecho.com/ +[22]: https://www.kurento.org/kurento-architecture +[23]: https://en.wikipedia.org/wiki/OpenWebRTC +[24]: https://webrtchacks.com/building-webrtc-from-source/ +[25]: https://gstreamer.freedesktop.org/documentation/application-development/introduction/basics.html +[26]: https://en.wikipedia.org/wiki/Secure_Real-time_Transport_Protocol +[27]: https://github.com/centricular/gstwebrtc-demos/ +[28]: https://linux.conf.au/schedule/presentation/143/ +[29]: https://linux.conf.au/ From e8efcb0f11e8067cc29c234d164552ca7c0fe22a Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 12:08:04 +0800 Subject: [PATCH 034/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190126=20Get=20?= =?UTF-8?q?started=20with=20Tint2,=20an=20open=20source=20taskbar=20for=20?= =?UTF-8?q?Linux=20sources/tech/20190126=20Get=20started=20with=20Tint2,?= =?UTF-8?q?=20an=20open=20source=20taskbar=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Tint2, an open source taskbar for Linux.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md diff --git a/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md b/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md new file mode 100644 index 0000000000..601b90370c --- /dev/null +++ b/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md @@ -0,0 +1,59 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Tint2, an open source taskbar for Linux) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-tint2) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with Tint2, an open source taskbar for Linux +====== + +Tint2, the 14th in our series on open source tools that will make you more productive in 2019, offers a consistent user experience with any window manager. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 14th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Tint2 + +One of the best ways for me to be more productive is to use a clean interface with as little distraction as possible. As a Linux user, this means using a minimal window manager like [Openbox][1], [i3][2], or [Awesome][3]. Each has customization options that make me more efficient. The one thing that slows me down is that none has a consistent configuration, so I have to tweak and re-tune my window manager constantly. + +![](https://opensource.com/sites/default/files/uploads/tint2-1.png) + +[Tint2][4] is a lightweight panel and taskbar that provides a consistent experience with any window manager. It is included with most distributions, so it is as easy to install as any other package. + +It includes two programs, Tint2 and Tint2conf. At first launch, Tint2 starts with its default layout and theme. The default configuration includes multiple web browsers, the tint2conf program, a taskbar, and a system tray. + +![](https://opensource.com/sites/default/files/uploads/tint2-2.png) + +Launching the configuration tool allows you to select from the included themes and customize the top, bottom, and sides of the screen. I recommend starting with the theme that is closest to what you want and customizing from there. + +![](https://opensource.com/sites/default/files/uploads/tint2-3.png) + +Within the themes, you can customize where panel items are placed as well as background and font options for every item on the panel. You can also add and remove items from the launcher. + +![](https://opensource.com/sites/default/files/uploads/tint2-4.png) + +Tint2 is a lightweight taskbar that helps you get to the tools you need quickly and efficiently. It is highly customizable, unobtrusive (unless the user wants it not to be), and compatible with almost any window manager on a Linux desktop. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-tint2 + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: http://openbox.org/wiki/Main_Page +[2]: https://i3wm.org/ +[3]: https://awesomewm.org/ +[4]: https://gitlab.com/o9000/tint2 From b883b0a4ff690beb1db6ac9d8ffc6b85a2d539aa Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 12:15:05 +0800 Subject: [PATCH 035/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190125=20Top=20?= =?UTF-8?q?5=20Linux=20Distributions=20for=20Development=20in=202019=20sou?= =?UTF-8?q?rces/tech/20190125=20Top=205=20Linux=20Distributions=20for=20De?= =?UTF-8?q?velopment=20in=202019.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...x Distributions for Development in 2019.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20190125 Top 5 Linux Distributions for Development in 2019.md diff --git a/sources/tech/20190125 Top 5 Linux Distributions for Development in 2019.md b/sources/tech/20190125 Top 5 Linux Distributions for Development in 2019.md new file mode 100644 index 0000000000..b3e2de22ba --- /dev/null +++ b/sources/tech/20190125 Top 5 Linux Distributions for Development in 2019.md @@ -0,0 +1,161 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top 5 Linux Distributions for Development in 2019) +[#]: via: (https://www.linux.com/blog/2019/1/top-5-linux-distributions-development-2019) +[#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) + +Top 5 Linux Distributions for Development in 2019 +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dev-main.jpg?itok=DEe9pYtb) + +One of the most popular tasks undertaken on Linux is development. With good reason: Businesses rely on Linux. Without Linux, technology simply wouldn’t meet the demands of today’s ever-evolving world. Because of that, developers are constantly working to improve the environments with which they work. One way to manage such improvements is to have the right platform to start with. Thankfully, this is Linux, so you always have a plethora of choices. + +But sometimes, too many choices can be a problem in and of itself. Which distribution is right for your development needs? That, of course, depends on what you’re developing, but certain distributions that just make sense to use as a foundation for your task. I’ll highlight five distributions I consider the best for developers in 2019. + +### Ubuntu + +Let’s not mince words here. Although the Linux Mint faithful are an incredibly loyal group (with good reason, their distro of choice is fantastic), Ubuntu Linux gets the nod here. Why? Because, thanks to the likes of [AWS][1], Ubuntu is one of the most deployed server operating systems. That means developing on a Ubuntu desktop distribution makes for a much easier translation to Ubuntu Server. And because Ubuntu makes it incredibly easy to develop for, work with, and deploy containers, it makes perfect sense that you’d want to work with this platform. Couple that with Ubuntu’s inclusion of Snap Packages, and Canonical's operating system gets yet another boost in popularity. + +But it’s not just about what you can do with Ubuntu, it’s how easily you can do it. For nearly every task, Ubuntu is an incredibly easy distribution to use. And because Ubuntu is so popular, chances are every tool and IDE you want to work with can be easily installed from the Ubuntu Software GUI (Figure 1). + +![Ubuntu][3] + +Figure 1: Developer tools found in the Ubuntu Software tool. + +[Used with permission][4] + +If you’re looking for ease of use, simplicity of migration, and plenty of available tools, you cannot go wrong with Ubuntu as a development platform. + +### openSUSE + +There’s a very specific reason why I add openSUSE to this list. Not only is it an outstanding desktop distribution, it’s also one of the best rolling releases you’ll find on the market. So if you’re wanting to develop with and release for the most recent software available, [openSUSE Tumbleweed][5] should be one of your top choices. If you want to leverage the latest releases of your favorite IDEs, if you always want to make sure you’re developing with the most recent libraries and toolkits, Tumbleweed is your platform. + +But openSUSE doesn’t just offer a rolling release distribution. If you’d rather make use of a standard release platform, [openSUSE Leap][6] is what you want. + +Of course, it’s not just about standard or rolling releases. The openSUSE platform also has a Kubernetes-specific release, called [Kubic][7], which is based on Kubernetes atop openSUSE MicroOS. But even if you aren’t developing for Kubernetes, you’ll find plenty of software and tools to work with. + +And openSUSE also offers the ability to select your desktop environment, or (should you chose) a generic desktop or server (Figure 2). + +![openSUSE][9] + +Figure 2: The openSUSE Tumbleweed installation in action. + +[Used with permission][4] + +### Fedora + +Using Fedora as a development platform just makes sense. Why? The distribution itself seems geared toward developers. With a regular, six month release cycle, developers can be sure they won’t be working with out of date software for long. This can be important, when you need the most recent tools and libraries. And if you’re developing for enterprise-level businesses, Fedora makes for an ideal platform, as it is the upstream for Red Hat Enterprise Linux. What that means is the transition to RHEL should be painless. That’s important, especially if you hope to bring your project to a much larger market (one with deeper pockets than a desktop-centric target). + +Fedora also offers one of the best GNOME experiences you’ll come across (Figure 3). This translates to a very stable and fast desktops. + +![GNOME][11] + +Figure 3: The GNOME desktop on Fedora. + +[Used with permission][4] + +But if GNOME isn’t your jam, you can opt to install one of the [Fedora spins][12] (which includes KDE, XFCE, LXQT, Mate-Compiz, Cinnamon, LXDE, and SOAS). + +### Pop!_OS + +I’d be remiss if I didn’t include [System76][13]’s platform, customized specifically for their hardware (although it does work fine on other hardware). Why would I include such a distribution, especially one that doesn’t really venture far away from the Ubuntu platform for which is is based? Primarily because this is the distribution you want if you plan on purchasing a desktop or laptop from System76. But why would you do that (especially given that Linux works on nearly all off-the-shelf hardware)? Because System76 sells outstanding hardware. With the release of their Thelio desktop, you have available one of the most powerful desktop computers on the market. If you’re developing seriously large applications (especially ones that lean heavily on very large databases or require a lot of processing power for compilation), why not go for the best? And since Pop!_OS is perfectly tuned for System76 hardware, this is a no-brainer. +Since Pop!_OS is based on Ubuntu, you’ll have all the tools available to the base platform at your fingertips (Figure 4). + +![Pop!_OS][15] + +Figure 4: The Anjunta IDE running on Pop!_OS. + +[Used with permission][4] + +Pop!_OS also defaults to encrypted drives, so you can trust your work will be safe from prying eyes (should your hardware fall into the wrong hands). + +### Manjaro + +For anyone that likes the idea of developing on Arch Linux, but doesn’t want to have to jump through all the hoops of installing and working with Arch Linux, there’s Manjaro. Manjaro makes it easy to have an Arch Linux-based distribution up and running (as easily as installing and using, say, Ubuntu). + +But what makes Manjaro developer-friendly (besides enjoying that Arch-y goodness at the base) is how many different flavors you’ll find available for download. From the [Manjaro download page][16], you can grab the following flavors: + + * GNOME + + * XFCE + + * KDE + + * OpenBox + + * Cinnamon + + * I3 + + * Awesome + + * Budgie + + * Mate + + * Xfce Developer Preview + + * KDE Developer Preview + + * GNOME Developer Preview + + * Architect + + * Deepin + + + + +Of note are the developer editions (which are geared toward testers and developers), the Architect edition (which is for users who want to build Manjaro from the ground up), and the Awesome edition (Figure 5 - which is for developers dealing with everyday tasks). The one caveat to using Manjaro is that, like any rolling release, the code you develop today may not work tomorrow. Because of this, you need to think with a certain level of agility. Of course, if you’re not developing for Manjaro (or Arch), and you’re doing more generic (or web) development, that will only affect you if the tools you use are updated and no longer work for you. Chances of that happening, however, are slim. And like with most Linux distributions, you’ll find a ton of developer tools available for Manjaro. + +![Manjaro][18] + +Figure 5: The Manjaro Awesome Edition is great for developers. + +[Used with permission][4] + +Manjaro also supports the Arch User Repository (a community-driven repository for Arch users), which includes cutting edge software and libraries, as well as proprietary applications like [Unity Editor][19] or yEd. A word of warning, however, about the Arch User Repository: It was discovered that the AUR contained software considered to be malicious. So, if you opt to work with that repository, do so carefully and at your own risk. + +### Any Linux Will Do + +Truth be told, if you’re a developer, just about any Linux distribution will work. This is especially true if you do most of your development from the command line. But if you prefer a good GUI running on top of a reliable desktop, give one of these distributions a try, they will not disappoint. + +Learn more about Linux through the free ["Introduction to Linux" ][20]course from The Linux Foundation and edX. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/2019/1/top-5-linux-distributions-development-2019 + +作者:[Jack Wallen][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/jlwallen +[b]: https://github.com/lujun9972 +[1]: https://aws.amazon.com/ +[2]: https://www.linux.com/files/images/dev1jpg +[3]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dev_1.jpg?itok=7QJQWBKi (Ubuntu) +[4]: https://www.linux.com/licenses/category/used-permission +[5]: https://en.opensuse.org/Portal:Tumbleweed +[6]: https://en.opensuse.org/Portal:Leap +[7]: https://software.opensuse.org/distributions/tumbleweed +[8]: /files/images/dev2jpg +[9]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dev_2.jpg?itok=1GJmpr1t (openSUSE) +[10]: /files/images/dev3jpg +[11]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dev_3.jpg?itok=_6Ki4EOo (GNOME) +[12]: https://spins.fedoraproject.org/ +[13]: https://system76.com/ +[14]: /files/images/dev4jpg +[15]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dev_4.jpg?itok=nNG2Ax24 (Pop!_OS) +[16]: https://manjaro.org/download/ +[17]: /files/images/dev5jpg +[18]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/dev_5.jpg?itok=RGfF2UEi (Manjaro) +[19]: https://unity3d.com/unity/editor +[20]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux From 2a5eaf7780cfed47bb3e5ab47a1155435745c1a5 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 12:56:51 +0800 Subject: [PATCH 036/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190124=20ODrive?= =?UTF-8?q?=20(Open=20Drive)=20=E2=80=93=20Google=20Drive=20GUI=20Client?= =?UTF-8?q?=20For=20Linux=20sources/tech/20190124=20ODrive=20(Open=20Drive?= =?UTF-8?q?)=20-=20Google=20Drive=20GUI=20Client=20For=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ve) - Google Drive GUI Client For Linux.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/tech/20190124 ODrive (Open Drive) - Google Drive GUI Client For Linux.md diff --git a/sources/tech/20190124 ODrive (Open Drive) - Google Drive GUI Client For Linux.md b/sources/tech/20190124 ODrive (Open Drive) - Google Drive GUI Client For Linux.md new file mode 100644 index 0000000000..71a91ec3d8 --- /dev/null +++ b/sources/tech/20190124 ODrive (Open Drive) - Google Drive GUI Client For Linux.md @@ -0,0 +1,127 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (ODrive (Open Drive) – Google Drive GUI Client For Linux) +[#]: via: (https://www.2daygeek.com/odrive-open-drive-google-drive-gui-client-for-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +ODrive (Open Drive) – Google Drive GUI Client For Linux +====== + +This we had discussed in so many times. However, i will give a small introduction about it. + +As of now there is no official Google Drive Client for Linux and we need to use unofficial clients. + +There are many applications available in Linux for Google Drive integration. + +Each application has came out with set of features. + +We had written few articles about this in our website in the past. + +Those are **[DriveSync][1]** , **[Google Drive Ocamlfuse Client][2]** and **[Mount Google Drive in Linux Using Nautilus File Manager][3]**. + +Today also we are going to discuss about the same topic and the utility name is ODrive. + +### What’s ODrive? + +ODrive stands for Open Drive. It’s a GUI client for Google Drive which was written in electron framework. + +It’s simple GUI which allow users to integrate the Google Drive with few steps. + +### How To Install & Setup ODrive on Linux? + +Since the developer is offering the AppImage package and there is no difficulty for installing the ODrive on Linux. + +Simple download the latest ODrive AppImage package from developer github page using **wget Command**. + +``` +$ wget https://github.com/liberodark/ODrive/releases/download/0.1.3/odrive-0.1.3-x86_64.AppImage +``` + +You have to set executable file permission to the ODrive AppImage file. + +``` +$ chmod +x odrive-0.1.3-x86_64.AppImage +``` + +Simple run the following ODrive AppImage file to launch the ODrive GUI for further setup. + +``` +$ ./odrive-0.1.3-x86_64.AppImage +``` + +You might get the same window like below when you ran the above command. Just hit the **`Next`** button for further setup. +![][5] + +Click **`Connect`** link to add a Google drive account. +![][6] + +Enter your email id which you want to setup a Google Drive account. +![][7] + +Enter your password for the given email id. +![][8] + +Allow ODrive (Open Drive) to access your Google account. +![][9] + +By default, it will choose the folder location. You can change if you want to use the specific one. +![][10] + +Finally hit **`Synchronize`** button to start download the files from Google Drive to your local system. +![][11] + +Synchronizing is in progress. +![][12] + +Once synchronizing is completed. It will show you all files downloaded. +Once synchronizing is completed. It’s shows you that all the files has been downloaded. +![][13] + +I have seen all the files were downloaded in the mentioned directory. +![][14] + +If you want to sync any new files from local system to Google Drive. Just start the `ODrive` from the application menu but it won’t actual launch the application. But it will be running in the background that we can able to see by using the ps command. + +``` +$ ps -df | grep odrive +``` + +![][15] + +It will automatically sync once you add a new file into the google drive folder. The same has been checked through notification menu. Yes, i can see one file was synced to Google Drive. +![][16] + +GUI is not loading after sync, and i’m not sure this functionality. I will check with developer and will add update based on his input. + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/odrive-open-drive-google-drive-gui-client-for-linux/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/drivesync-google-drive-sync-client-for-linux/ +[2]: https://www.2daygeek.com/mount-access-google-drive-on-linux-with-google-drive-ocamlfuse-client/ +[3]: https://www.2daygeek.com/mount-access-setup-google-drive-in-linux/ +[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[5]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-1.png +[6]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-2.png +[7]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-3.png +[8]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-4.png +[9]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-5.png +[10]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-6.png +[11]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-7.png +[12]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-8a.png +[13]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-9.png +[14]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-11.png +[15]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-9b.png +[16]: https://www.2daygeek.com/wp-content/uploads/2019/01/odrive-open-drive-google-drive-gui-client-for-linux-10.png From cb141a76e2ef5c575e4d7631ec14e222c88ff709 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 13:03:08 +0800 Subject: [PATCH 037/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190124=20Get=20?= =?UTF-8?q?started=20with=20LogicalDOC,=20an=20open=20source=20document=20?= =?UTF-8?q?management=20system=20sources/tech/20190124=20Get=20started=20w?= =?UTF-8?q?ith=20LogicalDOC,=20an=20open=20source=20document=20management?= =?UTF-8?q?=20system.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... open source document management system.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sources/tech/20190124 Get started with LogicalDOC, an open source document management system.md diff --git a/sources/tech/20190124 Get started with LogicalDOC, an open source document management system.md b/sources/tech/20190124 Get started with LogicalDOC, an open source document management system.md new file mode 100644 index 0000000000..21687c0ce3 --- /dev/null +++ b/sources/tech/20190124 Get started with LogicalDOC, an open source document management system.md @@ -0,0 +1,62 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with LogicalDOC, an open source document management system) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-logicaldoc) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney) + +Get started with LogicalDOC, an open source document management system +====== +Keep better track of document versions with LogicalDOC, the 12th in our series on open source tools that will make you more productive in 2019. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/document_free_access_cut_security.png?itok=ocvCv8G2) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 12th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### LogicalDOC + +Part of being productive is being able to find what you need when you need it. We've all seen directories full of similar files with similar names, a result of renaming them every time a document changes to keep track of all the versions. For example, my wife is a writer, and she often saves document revisions with new names before she sends them to reviewers. + +![](https://opensource.com/sites/default/files/uploads/logicaldoc-1.png) + +A coder's natural solution to this problem—Git or another version control tool—won't work for document creators because the systems used for code often don't play nice with the formats used by commercial text editors. And before someone says, "just change formats," [that isn't an option for everyone][1]. Also, many version control tools are not very friendly for the less technically inclined. In large organizations, there are tools to solve this problem, but they also require the resources of a large organization to run, manage, and support them. + +![](https://opensource.com/sites/default/files/uploads/logicaldoc-2.png) + +[LogicalDOC CE][2] is an open source document management system built to solve this problem. It allows users to check in, check out, version, search, and lock document files and keeps a history of versions, similar to the version control tools used by coders. + +LogicalDOC can be [installed][3] on Linux, MacOS, and Windows using a Java-based installer. During installation, you'll be prompted for details on the database where its data will be stored and have an option for a local-only file store. You'll get the URL and a default username and password to access the server as well as an option to save a script to automate future installations. + +After you log in, LogicalDOC's default screen lists the documents you have tagged, checked out, and any recent notes on them. Switching to the Documents tab will show the files you have access to. You can upload documents by selecting a file through the interface or using drag and drop. If you upload a ZIP file, LogicalDOC will expand it and add its individual files to the repository. + +![](https://opensource.com/sites/default/files/uploads/logicaldoc-3.png) + +Right-clicking on a file will bring up a menu of options to check out files, lock files against changes, and do a whole host of other things. Checking out a file downloads it to your local machine where it can be edited. A checked-out file cannot be modified by anyone else until it's checked back in. When the file is checked back in (using the same menu), the user can add tags to the version and is required to comment on what was done to it. + +![](https://opensource.com/sites/default/files/uploads/logicaldoc-4.png) + +Going back and looking at earlier versions is as easy as downloading them from the Versions page. There are also import and export options for some third-party services, with [Dropbox][4] support built-in. + +Document management is not just for big companies that can afford expensive solutions. LogicalDOC helps you keep track of the documents you're using with a revision history and a safe repository for documents that are otherwise difficult to manage. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-logicaldoc + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: http://www.antipope.org/charlie/blog-static/2013/10/why-microsoft-word-must-die.html +[2]: https://www.logicaldoc.com/download-logicaldoc-community +[3]: https://docs.logicaldoc.com/en/installation +[4]: https://dropbox.com From bfb56404e93927bebb67fed1b1b23c1aeba23fe4 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 13:05:02 +0800 Subject: [PATCH 038/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190124=20What?= =?UTF-8?q?=20does=20DevOps=20mean=20to=20you=3F=20sources/tech/20190124?= =?UTF-8?q?=20What=20does=20DevOps=20mean=20to=20you.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190124 What does DevOps mean to you.md | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sources/tech/20190124 What does DevOps mean to you.md diff --git a/sources/tech/20190124 What does DevOps mean to you.md b/sources/tech/20190124 What does DevOps mean to you.md new file mode 100644 index 0000000000..c62f0f83ba --- /dev/null +++ b/sources/tech/20190124 What does DevOps mean to you.md @@ -0,0 +1,143 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What does DevOps mean to you?) +[#]: via: (https://opensource.com/article/19/1/what-does-devops-mean-you) +[#]: author: (Girish Managoli https://opensource.com/users/gammay) + +What does DevOps mean to you? +====== +6 experts break down DevOps and the practices and philosophies key to making it work. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M) + +It's said if you ask 10 people about DevOps, you will get 12 answers. This is a result of the diversity in opinions and expectations around DevOps—not to mention the disparity in its practices. + +To decipher the paradoxes around DevOps, we went to the people who know it the best—its top practitioners around the industry. These are people who have been around the horn, who know the ins and outs of technology, and who have practiced DevOps for years. Their viewpoints should encourage, stimulate, and provoke your thoughts around DevOps. + +### What does DevOps mean to you? + +Let's start with the fundamentals. We're not looking for textbook answers, rather we want to know what the experts say. + +In short, the experts say DevOps is about principles, practices, and tools. + +[Ann Marie Fred][1], DevOps lead for IBM Digital Business Group's Commerce Platform, says, "to me, DevOps is a set of principles and practices designed to make teams more effective in designing, developing, delivering, and operating software." + +According to [Daniel Oh][2], senior DevOps evangelist at Red Hat, "in general, DevOps is compelling for enterprises to evolve current IT-based processes and tools related to app development, IT operations, and security protocol." + +[Brent Reed][3], founder of Tactec Strategic Solutions, talks about continuous improvement for the stakeholders. "DevOps means to me a way of working that includes a mindset that allows for continuous improvement for operational performance, maturing to organizational performance, resulting in delighted stakeholders." + +Many of the experts also emphasize culture. Ann Marie says, "it's also about continuous improvement and learning. It's about people and culture as much as it is about tools and technology." + +To [Dan Barker][4], chief architect and DevOps leader at the National Association of Insurance Commissioners (NAIC), "DevOps is primarily about culture. … It has brought several independent areas together like lean, [just culture][5], and continuous learning. And I see culture as being the most critical and the hardest to execute on." + +[Chris Baynham-Hughes][6], head of DevOps at Atos, says, "[DevOps] practice is adopted through the evolution of culture, process, and tooling within an organization. The key focus is culture change, and the key tenants of DevOps culture are collaboration, experimentation, fast-feedback, and continuous improvement." + +[Geoff Purdy][7], cloud architect, talks about agility and feedback "shortening and amplifying feedback loops. We want teams to get feedback in minutes rather than weeks." + +But in the end, Daniel nails it by explaining how open source and open culture allow him to achieve his goals "in easy and quick ways. In DevOps initiatives, the most important thing for me should be open culture rather than useful tools, multiple solutions." + +### What DevOps practices have you found effective? + +"Picking one, automated provisioning has been hugely effective for my team. " + +The most effective practices cited by the experts are pervasive yet disparate. + +According to Ann Marie, "some of the most powerful [practices] are agile project management; breaking down silos between cross-functional, autonomous squads; fully automated continuous delivery; green/blue deploys for zero downtime; developers setting up their own monitoring and alerting; blameless post-mortems; automating security and compliance." + +Chris says, "particular breakthroughs have been empathetic collaboration; continuous improvement; open leadership; reducing distance to the business; shifting from vertical silos to horizontal, cross-functional product teams; work visualization; impact mapping; Mobius loop; shortening of feedback loops; automation (from environments to CI/CD)." + +Brent supports "evolving a learning culture that includes TDD [test-driven development] and BDD [behavior-driven development] capturing of a story and automating the sequences of events that move from design, build, and test through implementation and production with continuous integration and delivery pipelines. A fail-first approach to testing, the ability to automate integration and delivery processes and include fast feedback throughout the lifecycle." + +Geoff highlights automated provisioning. "Picking one, automated provisioning has been hugely effective for my team. More specifically, automated provisioning from a versioned Infrastructure-as-Code codebase." + +Dan uses fun. "We do a lot of different things to create a DevOps culture. We hold 'lunch and learns' with free food to encourage everyone to come and learn together; we buy books and study in groups." + +### How do you motivate your team to achieve DevOps goals? + +``` +"Celebrate wins and visualize the progress made." +``` + +Daniel emphasizes "automation that matters. In order to minimize objection from multiple teams in a DevOps initiative, you should encourage your team to increase the automation capability of development, testing, and IT operations along with new processes and procedures. For example, a Linux container is the key tool to achieve the automation capability of DevOps." + +Geoff agrees, saying, "automate the toil. Are there tasks you hate doing? Great. Engineer them out of existence if possible. Otherwise, automate them. It keeps the job from becoming boring and routine because the job constantly evolves." + +Dan, Ann Marie, and Brent stress team motivation. + +Dan says, "at the NAIC, we have a great awards system for encouraging specific behaviors. We have multiple tiers of awards, and two of them can be given to anyone by anyone. We also give awards to teams after they complete something significant, but we often award individual contributors." + +According to Ann Marie, "the biggest motivator for teams in my area is seeing the success of others. We have a weekly playback for each other, and part of that is sharing what we've learned from trying out new tools or practices. When teams are enthusiastic about something they're doing and willing to help others get started, more teams will quickly get on board." + +Brent agrees. "Getting everyone educated and on the same baseline of knowledge is essential ... assessing what helps the team achieve [and] what it needs to deliver with the product owner and users is the first place I like to start." + +Chris recommends a two-pronged approach. "Run small, weekly goals that are achievable and agreed by the team as being important and [where] they can see progress outside of the feature work they are doing. Celebrate wins and visualize the progress made." + +### How do DevOps and agile work together? + +``` +"DevOps != Agile, second Agile != Scrum." +``` + +This is an important question because both DevOps and agile are cornerstones of modern software development. + +DevOps is a process of software development focusing on communication and collaboration to facilitate rapid application and product deployment, whereas agile is a development methodology involving continuous development, continuous iteration, and continuous testing to achieve predictable and quality deliverables. + +So, how do they relate? Let's ask the experts. + +In Brent's view, "DevOps != Agile, second Agile != Scrum. … Agile tools and ways of working—that support DevOps strategies and goals—are how they mesh together." + +Chris says, "agile is a fundamental component of DevOps for me. Sure, we could talk about how we adopt DevOps culture in a non-agile environment, but ultimately, improving agility in the way software is engineered is a key indicator as to the maturity of DevOps adoption within the organization." + +Dan relates DevOps to the larger [Agile Manifesto][8]. "I never talk about agile without referencing the Agile Manifesto in order to set the baseline. There are many implementations that don't focus on the Manifesto. When you read the Manifesto, they've really described DevOps from a development perspective. Therefore, it is very easy to fit agile into a DevOps culture, as agile is focused on communication, collaboration, flexibility to change, and getting to production quickly." + +Geoff sees "DevOps as one of many implementations of agile. Agile is essentially a set of principles, while DevOps is a culture, process, and toolchain that embodies those principles." + +Ann Marie keeps it succinct, saying "agile is a prerequisite for DevOps. DevOps makes agile more effective." + +### Has DevOps benefited from open source? + +``` +"Open source done well requires a DevOps culture." +``` + +This question receives a fervent "yes" from all participants followed by an explanation of the benefits they've seen. + +Ann Marie says, "we get to stand on the shoulders of giants and build upon what's already available. The open source model of maintaining software, with pull requests and code reviews, also works very well for DevOps teams." + +Chris agrees that DevOps has "undoubtedly" benefited from open source. "From the engineering and tooling side (e.g., Ansible), to the process and people side, through the sharing of stories within the industry and the open leadership community." + +A benefit Geoff cites is "grassroots adoption. Nobody had to sign purchase requisitions for free (as in beer) software. Teams found tooling that met their needs, were free (as in freedom) to modify, [then] built on top of it, and contributed enhancements back to the larger community. Rinse, repeat." + +Open source has shown DevOps "better ways you can adopt new changes and overcome challenges, just like open source software developers are doing it," says Daniel. + +Brent concurs. "DevOps has benefited in many ways from open source. One way is the ability to use the tools to understand how they can help accelerate DevOps goals and strategies. Educating the development and operations folks on crucial things like automation, virtualization and containerization, auto-scaling, and many of the qualities that are difficult to achieve without introducing technology enablers that make DevOps easier." + +Dan notes the two-way, symbiotic relationship between DevOps and open source. "Open source done well requires a DevOps culture. Most open source projects have very open communication structures with very little obscurity. This has actually been a great learning opportunity for DevOps practitioners around what they might bring into their own organizations. Also, being able to use tools from a community that is similar to that of your own organization only encourages your own culture growth. I like to use GitLab as an example of this symbiotic relationship. When I bring [GitLab] into a company, we get a great tool, but what I'm really buying is their unique culture. That brings substantial value through our interactions with them and our ability to contribute back. Their tool also has a lot to offer for a DevOps organization, but their culture has inspired awe in the companies where I've introduced it." + +Now that our DevOps experts have weighed in, please share your thoughts on what DevOps means—as well as the other questions we posed—in the comments. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/what-does-devops-mean-you + +作者:[Girish Managoli][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gammay +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/DukeAMO +[2]: https://twitter.com/danieloh30?lang=en +[3]: https://twitter.com/brentareed +[4]: https://twitter.com/barkerd427 +[5]: https://psnet.ahrq.gov/resources/resource/1582 +[6]: https://twitter.com/onlychrisbh?lang=en +[7]: https://twitter.com/geoff_purdy +[8]: https://agilemanifesto.org/ From e3e43e688e08770972e5d120ca9b05d40ea02bd0 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Mon, 28 Jan 2019 13:29:08 +0800 Subject: [PATCH 039/164] Translating An Introduction to Go. --- translated/tech/20181224 An Introduction to Go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 0c2758fe2f..3e595e4cea 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -213,7 +213,7 @@ if err != nil { } ``` -There are two functions to quickly unwind and recover the call stack, though: `panic()` and `recover()`. When `panic()` is called, the call stack is unwound, and any deferred functions are run as usual. When a deferred function invokes `recover()`, the unwinding stops, and the value given to `panic()` is returned. If we are unwinding normally and not due to a panic, `recover()` simply returns `nil`. In the example below, a function is deferred and any `error` value that is given to `panic()` will be recovered and stored in an error return value. Libraries sometimes use that approach to make highly recursive code like parsers more readable, while still maintaining the usual error return value for public functions. +有两个函数可以快速跳出和恢复调用栈:`panic()` 和 `recover()`。当 `panic()` 被调用时,调用栈开始弹出,同时每个 `defer` 函数都会正常运行。当一个 `defer` 函数调用 `recover()`时,调用栈停止弹出,同时返回函数 `panic()` 给出的值。如果我们让调用栈正常弹出而不是由于调用 `panic()` 函数,`recover()` 将只返回 `nil`。在下面的例子中,`defer` 函数将捕获 `panic()` 抛出的任何 `error` 类型的值并储存在错误返回值中。第三方库中有时会使用这个方法增强递归代码的可读性,如解析器,同时保持公有函数仍使用普通错误返回值。 ``` func Function() (err error) { @@ -229,7 +229,7 @@ func Function() (err error) { } ``` -### Arrays 和 slices +### 数组和切片 As mentioned before, an array is a value type and a slice is a pointer into an array, created either by slicing an existing array or by using `make()` to create a slice, which will create an anonymous array to hold the elements. From 84f48abce5de96e9073cd333e098ea296d7eca43 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:03:09 +0800 Subject: [PATCH 040/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190125=20Using?= =?UTF-8?q?=20Antora=20for=20your=20open=20source=20documentation=20source?= =?UTF-8?q?s/tech/20190125=20Using=20Antora=20for=20your=20open=20source?= =?UTF-8?q?=20documentation.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tora for your open source documentation.md | 208 ++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 sources/tech/20190125 Using Antora for your open source documentation.md diff --git a/sources/tech/20190125 Using Antora for your open source documentation.md b/sources/tech/20190125 Using Antora for your open source documentation.md new file mode 100644 index 0000000000..3df2862ba1 --- /dev/null +++ b/sources/tech/20190125 Using Antora for your open source documentation.md @@ -0,0 +1,208 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using Antora for your open source documentation) +[#]: via: (https://fedoramagazine.org/using-antora-for-your-open-source-documentation/) +[#]: author: (Adam Šamalík https://fedoramagazine.org/author/asamalik/) + +Using Antora for your open source documentation +====== +![](https://fedoramagazine.org/wp-content/uploads/2019/01/antora-816x345.jpg) + +Are you looking for an easy way to write and publish technical documentation? Let me introduce [Antora][1] — an open source documentation site generator. Simple enough for a tiny project, but also complex enough to cover large documentation sites such as [Fedora Docs][2]. + +With sources stored in git, written in a simple yet powerful markup language AsciiDoc, and a static HTML as an output, Antora makes writing, collaborating on, and publishing your documentation a no-brainer. + +### The basic concepts + +Before we build a simple site, let’s have a look at some of the core concepts Antora uses to make the world a happier place. Or, at least, to build a documentation website. + +#### Organizing the content + +All sources that are used to build your documentation site are stored in a **git repository**. Or multiple ones — potentially owned by different people. For example, at the time of writing, the Fedora Docs had its sources stored in 24 different repositories owned by different groups having their own rules around contributions. + +The content in Antora is organized into **components** , usually representing different areas of your project, or, well, different components of the software you’re documenting — such as the backend, the UI, etc. Components can be independently versioned, and each component gets a separate space on the docs site with its own menu. + +Components can be optionally broken down into so-called **modules**. Modules are mostly invisible on the site, but they allow you to organize your sources into logical groups, and even store each in different git repository if that’s something you need to do. We use this in Fedora Docs to separate [the Release Notes, the Installation Guide, and the System Administrator Guide][3] into three different source repositories with their own rules, while preserving a single view in the UI. + +What’s great about this approach is that, to some extent, the way your sources are physically structured is not reflected on the site. + +#### Virtual catalog + +When assembling the site, Antora builds a **virtual catalog** of all pages, assigning a [unique ID][4] to each one based on its name and the component, the version, and module it belongs to. The page ID is then used to generate URLs for each page, and for internal links as well. So, to some extent, the source repository structure doesn’t really matter as far as the site is concerned. + +As an example, if we’d for some reason decided to merge all the 24 repositories of Fedora Docs into one, nothing on the site would change. Well, except the “Edit this page” link on every page that would suddenly point to this one repository. + +#### Independent UI + +We’ve covered the content, but how it’s going to look like? + +Documentation sites generated with Antora use a so-called [UI bundle][5] that defines the look and feel of your site. The UI bundle holds all graphical assets such as CSS, images, etc. to make your site look beautiful. + +It is expected that the UI will be developed independently of the documentation content, and that’s exactly what Antora supports. + +#### Putting it all together + +Having sources distributed in multiple repositories might raise a question: How do you build the site? The answer is: [Antora Playbook][6]. + +Antora Playbook is a file that points to all the source repositories and the UI bundle. It also defines additional metadata such as the name of your site. + +The Playbook is the only file you need to have locally available in order to build the site. Everything else gets fetched automatically as a part of the build process. + +### Building a site with Antora + +Demo time! To build a minimal site, you need three things: + + 1. At least one component holding your AsciiDoc sources. + 2. An Antora Playbook. + 3. A UI bundle + + + +Good news is the nice people behind Antora provide [example Antora sources][7] we can try right away. + +#### The Playbook + +Let’s first have a look at [the Playbook][8]: + +``` +site: + title: Antora Demo Site +# the 404 page and sitemap files only get generated when the url property is set + url: https://example.org/docs + start_page: component-b::index.adoc +content: + sources: + - url: https://gitlab.com/antora/demo/demo-component-a.git + branches: master + - url: https://gitlab.com/antora/demo/demo-component-b.git + branches: [v2.0, v1.0] + start_path: docs +ui: + bundle: + url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable + snapshot: true +``` + +As we can see, the Playbook defines some information about the site, lists the content repositories, and points to the UI bundle. + +There are two repositories. The [demo-component-a][9] with a single branch, and the [demo-component-b][10] having two branches, each representing a different version. + +#### Components + +The minimal source repository structure is nicely demonstrated in the [demo-component-a][9] repository: + +``` +antora.yml <- component metadata +modules/ + ROOT/ <- the default module + nav.adoc <- menu definition + pages/ <- a directory with all the .adoc sources + source1.adoc + source2.adoc + ... +``` + +The following + +``` +antora.yml +``` + +``` +name: component-a +title: Component A +version: 1.5.6 +start_page: ROOT:inline-text-formatting.adoc +nav: + - modules/ROOT/nav.adoc +``` + +contains metadata for this component such as the name and the version of the component, the starting page, and it also points to a menu definition file. + +The menu definition file is a simple list that defines the structure of the menu and the content. It uses the [page ID][4] to identify each page. + +``` +* xref:inline-text-formatting.adoc[Basic Inline Text Formatting] +* xref:special-characters.adoc[Special Characters & Symbols] +* xref:admonition.adoc[Admonition] +* xref:sidebar.adoc[Sidebar] +* xref:ui-macros.adoc[UI Macros] +* Lists +** xref:lists/ordered-list.adoc[Ordered List] +** xref:lists/unordered-list.adoc[Unordered List] + +And finally, there's the actual content under modules/ROOT/pages/ — you can see the repository for examples, or the AsciiDoc syntax reference +``` + +#### The UI bundle + +For the UI, we’ll be using the example UI provided by the project. + +Going into the details of Antora UI would be above the scope of this article, but if you’re interested, please see the [Antora UI documentation][5] for more info. + +#### Building the site + +Note: We’ll be using Podman to run Antora in a container. You can [learn about Podman on the Fedora Magazine][11]. + +To build the site, we only need to call Antora on the Playbook file. + +The easiest way to get antora at the moment is to use the container image provided by the project. You can get it by running: + +``` +$ podman pull antora/antora +``` + +Let’s get the playbook repository: + +``` +$ git clone https://gitlab.com/antora/demo/demo-site.git +$ cd demo-site +``` + +And run Antora using the following command: + +``` +$ podman run --rm -it -v $(pwd):/antora:z antora/antora site.yml +``` + +The site will be available in the + +public + +``` +$ cd public +$ python3 -m http.server 8080 +``` + +directory. You can either open it in your web browser directly, or start a local web server using: + +Your site will be available on . + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/using-antora-for-your-open-source-documentation/ + +作者:[Adam Šamalík][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/asamalik/ +[b]: https://github.com/lujun9972 +[1]: https://antora.org/ +[2]: http://docs.fedoraproject.org/ +[3]: https://docs.fedoraproject.org/en-US/fedora/f29/ +[4]: https://docs.antora.org/antora/2.0/page/page-id/#structure +[5]: https://docs.antora.org/antora-ui-default/ +[6]: https://docs.antora.org/antora/2.0/playbook/ +[7]: https://gitlab.com/antora/demo +[8]: https://gitlab.com/antora/demo/demo-site/blob/master/site.yml +[9]: https://gitlab.com/antora/demo/demo-component-a +[10]: https://gitlab.com/antora/demo/demo-component-b +[11]: https://fedoramagazine.org/running-containers-with-podman/ From 7fac971d424ec937649cdcebdd2fe86a6b89c3f9 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:05:00 +0800 Subject: [PATCH 041/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190123=20Comman?= =?UTF-8?q?ds=20to=20help=20you=20monitor=20activity=20on=20your=20Linux?= =?UTF-8?q?=20server=20sources/tech/20190123=20Commands=20to=20help=20you?= =?UTF-8?q?=20monitor=20activity=20on=20your=20Linux=20server.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...u monitor activity on your Linux server.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 sources/tech/20190123 Commands to help you monitor activity on your Linux server.md diff --git a/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md b/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md new file mode 100644 index 0000000000..43f1c480ad --- /dev/null +++ b/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md @@ -0,0 +1,156 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Commands to help you monitor activity on your Linux server) +[#]: via: (https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Commands to help you monitor activity on your Linux server +====== +The watch, top, and ac commands provide some effective ways to oversee what is happening on your Linux servers. + +![](https://images.idgesg.net/images/article/2019/01/owl-face-100785829-large.jpg) + +Linux systems provide a number of commands that make it easy to report on system activity. In this post, we're going to look at several commands that are especially helpful. + +### The watch command + +The **watch** command is one that makes it easy to repeatedly examine a variety of data on your system — user activities, running processes, logins, memory usage, etc. All the command really does is run the command that you specify repeatedly, each time overwriting the previously displayed output, but this lends itself to a very convenient way of monitoring what's happening on your system. + +To start with a very basic and not particularly useful command, you could run **watch -n 5 date** and see a display with the current date and time that updates every 5 seconds. As you likely have guessed, the **-n 5** option specifies the number of seconds to wait between each run of the command. The default is 2 seconds. The command will run and update a display like this until you stop it with a ^c. + +``` +Every 5.0s: date butterfly: Wed Jan 23 15:59:14 2019 + +Wed Jan 23 15:59:14 EST 2019 +``` + +As a more interesting command example, you can watch an updated list of whoever is logging into the server. As written, this command will update every 10 seconds. Users who log out will disappear from the current display and those who log in will come into view. If no one is logging in or out, the display will remain the same except for the time displayed. + +``` +$ watch -n 10 who + +Every 10.0s: who butterfly: Tue Jan 23 16:02:03 2019 + +shs :0 2019-01-23 09:45 (:0) +dory pts/0 2019-01-23 15:50 (192.168.0.5) +nemo pts/1 2019-01-23 16:01 (192.168.0.15) +shark pts/3 2019-01-23 11:11 (192.168.0.27) +``` + +If you just want to see how many users are logged in, you can get a user count along with load averages showing you how hard the system is working by having watch call the **uptime** command. + +``` +$ watch uptime + +Every 2.0s: uptime butterfly: Tue Jan 23 16:25:48 2019 + + 16:25:48 up 22 days, 4:38, 3 users, load average: 1.15, 0.89, 1.02 +``` + +If you want to use watch to repeat a command that includes a pipe, you need to put the command between quote marks like this command that every 5 seconds shows you how many processes are running: + +``` +$ watch -n 5 'ps -ef | wc -l' + +Every 5.0s: ps -ef | wc -l butterfly: Tue Jan 23 16:11:54 2019 + +245 +``` + +To watch memory usage, you might try a command like this one: + +``` +$ watch -n 5 free -m + +Every 5.0s: free -m butterfly: Tue Jan 23 16:34:09 2019 + + total used free shared buff/cache available +Mem: 5959 776 3276 12 1906 4878 +Swap: 2047 0 2047 +``` + +You could watch processes being run by one particular user with **watch,** but the **top** command provides a much better option. + +### The top command + +If you want to watch one particular user's processes, top has an ideal option for you — the -u option: + +``` +$ top -u nemo +top - 16:14:33 up 2 days, 4:27, 3 users, load average: 0.00, 0.01, 0.02 +Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie +%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st +MiB Mem : 5959.4 total, 3277.3 free, 776.4 used, 1905.8 buff/cache +MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 4878.4 avail Mem + + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND +23026 nemo 20 0 46340 7820 6504 S 0.0 0.1 0:00.05 systemd +23033 nemo 20 0 149660 3140 72 S 0.0 0.1 0:00.00 (sd-pam) +23125 nemo 20 0 63396 5100 4092 S 0.0 0.1 0:00.00 sshd +23128 nemo 20 0 16836 5636 4284 S 0.0 0.1 0:00.03 zsh +``` + +You not only see what processes the user is running, but the resources (CPU time and memory) that the process is consuming and how hard the system is working overall. + +### The ac command + +If you'd like to see how much time each of your users is spending logged in, you can make use of the **ac** command. This requires installation of the **acct** (Debian) or **psacct** (RHEL, Centos, etc.) package. + +The **ac** command has a number of options, but it pulls its data from the current **wtmp** file. Here's an example showing the total number of hours users were logged in recently: + +``` +$ ac + total 1261.72 +``` + +This command shows total hours by user: + +``` +$ ac -p + shark 5.24 + nemo 5.52 + shs 1251.00 + total 1261.76 +``` + +This ac command shows daily counts of how many hours users were logged in: + +``` +$ ac -d | tail -10 + +Jan 11 total 0.05 +Jan 12 total 1.36 +Jan 13 total 16.39 +Jan 15 total 55.33 +Jan 16 total 38.02 +Jan 17 total 28.51 +Jan 19 total 48.66 +Jan 20 total 1.37 +Jan 22 total 23.48 +Today total 9.83 +``` + +### Wrap-up + +There are many commands for examining system activity. The **watch** command allows you to run just about any command in a repetitive way and watch how the output changes. The **top** command is a better option for focusing on user processes and also loops in a way that allows you to see the changes as they happen, while the **ac** command examines user connect time. + +Join the Network World communities on [Facebook][1] and [LinkedIn][2] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html + +作者:[Sandra Henry-Stocker][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.facebook.com/NetworkWorld/ +[2]: https://www.linkedin.com/company/network-world From 3bbe109a90d182ec7d1b51df4dc561848947e8db Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:06:57 +0800 Subject: [PATCH 042/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190125=20PyGame?= =?UTF-8?q?=20Zero:=20Games=20without=20boilerplate=20sources/tech/2019012?= =?UTF-8?q?5=20PyGame=20Zero-=20Games=20without=20boilerplate.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... PyGame Zero- Games without boilerplate.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20190125 PyGame Zero- Games without boilerplate.md diff --git a/sources/tech/20190125 PyGame Zero- Games without boilerplate.md b/sources/tech/20190125 PyGame Zero- Games without boilerplate.md new file mode 100644 index 0000000000..bdc100973a --- /dev/null +++ b/sources/tech/20190125 PyGame Zero- Games without boilerplate.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (PyGame Zero: Games without boilerplate) +[#]: via: (https://opensource.com/article/19/1/pygame-zero) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +PyGame Zero: Games without boilerplate +====== +Say goodbye to boring boilerplate in your game development with PyGame Zero. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python3-game.png?itok=jG9UdwC3) + +Python is a good beginner programming language. And games are a good beginner project: they are visual, self-motivating, and fun to show off to friends and family. However, the most common library to write games in Python, [PyGame][1], can be frustrating for beginners because forgetting seemingly small details can easily lead to nothing rendering. + +Until people understand why all the parts are there, they treat many of them as "mindless boilerplate"—magic paragraphs that need to be copied and pasted into their program to make it work. + +[PyGame Zero][2] is intended to bridge that gap by putting a layer of abstraction over PyGame so it requires literally no boilerplate. + +When we say literally, we mean it. + +This is a valid PyGame Zero file: + +``` +# This comment is here for clarity reasons +``` + +We can run put it in a **game.py** file and run: + +``` +$ pgzrun game.py +``` + +This will show a window and run a game loop that can be shut down by closing the window or interrupting the program with **CTRL-C**. + +This will, sadly, be a boring game. Nothing happens. + +To make it slightly more interesting, we can draw a different background: + +``` +def draw(): +    screen.fill((255, 0, 0)) +``` + +This will make the background red instead of black. But it is still a boring game. Nothing is happening. We can make it slightly more interesting: + +``` +colors = [0, 0, 0] + +def draw(): +    screen.fill(tuple(colors)) + +def update(): +    colors[0] = (colors[0] + 1) % 256 +``` + +This will make a window that starts black, becomes brighter and brighter red, then goes back to black, over and over again. + +The **update** function updates parameters, while the **draw** function renders the game based on these parameters. + +However, there is no way for the player to interact with the game! Let's try something else: + +``` +colors = [0, 0, 0] + +def draw(): +    screen.fill(tuple(colors)) + +def update(): +    colors[0] = (colors[0] + 1) % 256 + +def on_key_down(key, mod, unicode): +    colors[1] = (colors[1] + 1) % 256 +``` + +Now pressing keys on the keyboard will increase the "greenness." + +These comprise the three important parts of a game loop: respond to user input, update parameters, and re-render the screen. + +PyGame Zero offers much more, including functions for drawing sprites and playing sound clips. + +Try it out and see what type of game you can come up with! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/pygame-zero + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://www.pygame.org/news +[2]: https://pygame-zero.readthedocs.io/en/stable/ From 8a546cceddecce6bc16f4701e99694499d332b65 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:09:16 +0800 Subject: [PATCH 043/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190124=20Unders?= =?UTF-8?q?tanding=20Angle=20Brackets=20in=20Bash=20sources/tech/20190124?= =?UTF-8?q?=20Understanding=20Angle=20Brackets=20in=20Bash.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...24 Understanding Angle Brackets in Bash.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20190124 Understanding Angle Brackets in Bash.md diff --git a/sources/tech/20190124 Understanding Angle Brackets in Bash.md b/sources/tech/20190124 Understanding Angle Brackets in Bash.md new file mode 100644 index 0000000000..bd9a3782fb --- /dev/null +++ b/sources/tech/20190124 Understanding Angle Brackets in Bash.md @@ -0,0 +1,154 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understanding Angle Brackets in Bash) +[#]: via: (https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash) +[#]: author: (Paul Brown https://www.linux.com/users/bro66) + +Understanding Angle Brackets in Bash +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/architecture-1839450_1920.jpg?itok=ra6XonD3) + +[Bash][1] provides many important built-in commands, like `ls`, `cd`, and `mv`, as well as regular tools such as `grep`, `awk,` and `sed`. But, it is equally important to know the punctuation marks -- [the glue in the shape of dots][2], commas, brackets. and quotes -- that allow you to transform and push data from one place to another. Take angle brackets (`< >`), for example. + +### Pushing Around + +If you are familiar with other programming and scripting languages, you may have used `<` and `>` as logical operators to check in a condition whether one value is larger or smaller than another. If you have ever written HTML, you have used angle brackets to enclose tags. + +In shell scripting, you can also use brackets to push data from place to place, for example, to a file: + +``` +ls > dir_content.txt +``` + +In this example, instead of showing the contents of the directory on the command line, `>` tells the shell to copy it into a file called _dir_content.txt_. If _dir_content.txt_ doesn't exist, Bash will create it for you, but if _dir_content.txt_ already exists and is not empty, you will overwrite whatever it contained, so be careful! + +You can avoid overwriting existing content by tacking the new stuff onto the end of the old stuff. For that you use `>>` (instead of `>`): + +``` +ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt +``` + +This line stores the list of contents of your home directory into _dir_content.txt_. You then count the number of lines in _dir_content.txt_ (which gives you the number of items in the directory) with [`wc -l`][3] and you tack that value onto the end of the file. + +After running the command line on my machine, this is what my _dir_content.txt_ file looks like: + +``` +Applications +bin +cloud +Desktop +Documents +Downloads +Games +ISOs +lib +logs +Music +OpenSCAD +Pictures +Public +Templates +test_dir +Videos +17 dir_content.txt +``` + +The mnemonic here is to look at `>` and `>>` as arrows. In fact, the arrows can point the other way, too. Say you have a file called _CBActors_ containing some names of actors and the number of films by the Coen brothers they have been in. Something like this: + +``` +John Goodman 5 +John Turturro 3 +George Clooney 2 +Frances McDormand 6 +Steve Buscemi 5 +Jon Polito 4 +Tony Shalhoub 3 +James Gandolfini 1 +``` + +Something like + +``` +sort < CBActors # Do this +Frances McDormand 6 # And you get this +George Clooney 2 +James Gandolfini 1 +John Goodman 5 +John Turturro 3 +Jon Polito 4 +Steve Buscemi 5 +Tony Shalhoub 3 +``` + +Will [sort][4] the list alphabetically. But then again, you don't need `<` here since `sort` already expects a file anyway, so `sort CBActors` will work just as well. + +However, if you need to see who is the Coens' favorite actor, you can check with : + +``` +while read name surname films; do echo $films $name $surname > filmsfirst.txt; done < CBActors +``` + +Or, to make that a bit more readable: + +``` +while read name surname films;\ + do + echo $films $name $surname >> filmsfirst;\ + done < CBActors +``` + +Let's break this down, shall we? + + * the [`while ...; do ... done`][5] structure is a loop. The instructions between `do` and `done` are repeatedly executed while a condition is met, in this case... + * ... the [`read`][6] instruction has lines to read. `read` reads from the standard input and will continue reading until there is nothing more to read... + * ... And as standard input is fed in via `<` and comes from _CBActors_ , that means the `while` loop will loop until the last line of _CBActors_ is piped into the loop. + * Getting back to `read` for a sec, the tool is clever enough to see that there are three distinct fields separated by spaces on each line of the file. That allows you to put the first field from each line in the `name` variable, the second in `surname` and the third in `films`. This comes in handy later, on the line that says `echo $films $name $surname >> filmsfirst;\`, allowing you to reorder the fields and push them into a file called _filmsfirst_. + + + +At the end of all that, you have a file called _filmsfirst_ that looks like this: + +``` +5 John Goodman +3 John Turturro +2 George Clooney +6 Frances McDormand +5 Steve Buscemi +4 Jon Polito +3 Tony Shalhoub +1 James Gandolfini +``` + +which you can now use with `sort`: + +``` +sort -r filmsfirst +``` + +to see who is the Coens' favorite actor. Yes, it is Frances McDormand. (The [`-r`][4] option reverses the sort, so McDormand ends up on top). + +We'll look at more angles on this topic next time! + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash + +作者:[Paul Brown][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/bro66 +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/blog/2019/1/bash-shell-utility-reaches-50-milestone +[2]: https://www.linux.com/blog/learn/2019/1/linux-tools-meaning-dot +[3]: https://linux.die.net/man/1/wc +[4]: https://linux.die.net/man/1/sort +[5]: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html +[6]: https://linux.die.net/man/2/read From 8a3782fbf0fe5b0089e7d3fba50e458b198750e7 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:17:38 +0800 Subject: [PATCH 044/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190123=20Gettin?= =?UTF-8?q?g=20started=20with=20Isotope,=20an=20open=20source=20webmail=20?= =?UTF-8?q?client=20sources/tech/20190123=20Getting=20started=20with=20Iso?= =?UTF-8?q?tope,=20an=20open=20source=20webmail=20client.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Isotope, an open source webmail client.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20190123 Getting started with Isotope, an open source webmail client.md diff --git a/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md b/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md new file mode 100644 index 0000000000..e4a24a28a8 --- /dev/null +++ b/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md @@ -0,0 +1,60 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with Isotope, an open source webmail client) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-isotope) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Getting started with Isotope, an open source webmail client +====== +Read rich-text emails with Isotope, a lightweight email client and the 11th in our series on open source tools that will make you more productive in 2019. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/newsletter_email_mail_web_browser.jpg?itok=Lo91H9UH) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 11th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Isotope + +As we discussed in the [fourth article in this series][1] (about Cypht), we all spend a whole lot of time dealing with email. There are many options for dealing with it, and I've spent hours upon hours trying to find the best email client that works for me. I think that is an important distinction: What works for me doesn't always work for everyone else. And sometimes what works for me is a full client like [Thunderbird][2], sometimes it is a console client like [Mutt][3], and sometimes it's a web-based interface like [Gmail][4] or [RoundCube][5]. + +![](https://opensource.com/sites/default/files/uploads/isotope_1.png) + +[Isotope][6] is a locally hosted, web-based email client. It is exceptionally lightweight, uses IMAP exclusively, and takes up very little disk space. Unlike Cypht, Isotope has full HTML mail support, which means there are no issues displaying rich-text only emails. + +![](https://opensource.com/sites/default/files/uploads/isotope_2_0.png) + +Installing Isotope is very easy if you have [Docker][7] installed. You only need to copy the commands from the documentation into a console and press Enter. Point a browser at **localhost** to get the Isotope login screen, and entering your IMAP server, login name, and password will open the inbox view. + +![](https://opensource.com/sites/default/files/uploads/isotope_3.png) + +At this point, Isotope functions pretty much as you'd expect. Click a message to view it, click the pencil icon to create a new message, etc. You will note that the user interface (UI) is very minimalistic and doesn't have the typical buttons for things like "move to folder," "copy to folder," and "archive." You move messages around with drag and drop, so you don't really miss the buttons anyway. + +![](https://opensource.com/sites/default/files/uploads/isotope_4.png) + +Overall, Isotope is clean, fast, and works exceptionally well. Even better, it is under active development (the most recent commit was two hours before I wrote this article), so it is constantly getting improvements. You can check out the code and contribute to it on [GitHub][8]. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-isotope + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/article/19/1/productivity-tool-cypht-email +[2]: https://www.thunderbird.net/ +[3]: http://www.mutt.org/ +[4]: https://mail.google.com/ +[5]: https://roundcube.net/ +[6]: https://blog.marcnuri.com/isotope-mail-client-introduction/ +[7]: https://www.docker.com/ +[8]: https://github.com/manusa/isotope-mail From c07992967de7d87c66deed694d638f99b4ebf726 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:19:45 +0800 Subject: [PATCH 045/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190121=20How=20?= =?UTF-8?q?to=20Resize=20OpenStack=20Instance=20(Virtual=20Machine)=20from?= =?UTF-8?q?=20Command=20line=20sources/tech/20190121=20How=20to=20Resize?= =?UTF-8?q?=20OpenStack=20Instance=20(Virtual=20Machine)=20from=20Command?= =?UTF-8?q?=20line.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nce (Virtual Machine) from Command line.md | 149 ++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 sources/tech/20190121 How to Resize OpenStack Instance (Virtual Machine) from Command line.md diff --git a/sources/tech/20190121 How to Resize OpenStack Instance (Virtual Machine) from Command line.md b/sources/tech/20190121 How to Resize OpenStack Instance (Virtual Machine) from Command line.md new file mode 100644 index 0000000000..e235cabdbf --- /dev/null +++ b/sources/tech/20190121 How to Resize OpenStack Instance (Virtual Machine) from Command line.md @@ -0,0 +1,149 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Resize OpenStack Instance (Virtual Machine) from Command line) +[#]: via: (https://www.linuxtechi.com/resize-openstack-instance-command-line/) +[#]: author: (Pradeep Kumar http://www.linuxtechi.com/author/pradeep/) + +How to Resize OpenStack Instance (Virtual Machine) from Command line +====== + +Being a Cloud administrator, resizing or changing resources of an instance or virtual machine is one of the most common tasks. + +![](https://www.linuxtechi.com/wp-content/uploads/2019/01/Resize-openstack-instance.jpg) + +In Openstack environment, there are some scenarios where cloud user has spin a vm using some flavor( like m1.smalll) where root partition disk size is 20 GB, but at some point of time user wants to extends the root partition size to 40 GB. So resizing of vm’s root partition can be accomplished by using the resize option in nova command. During the resize, we need to specify the new flavor that will include disk size as 40 GB. + +**Note:** Once you extend the instance resources like RAM, CPU and disk using resize option in openstack then you can’t reduce it. + +**Read More on** : [**How to Create and Delete Virtual Machine(VM) from Command line in OpenStack**][1] + +In this tutorial I will demonstrate how to resize an openstack instance from command line. Let’s assume I have an existing instance named “ **test_resize_vm** ” and it’s associated flavor is “m1.small” and root partition disk size is 20 GB. + +Execute the below command from controller node to check on which compute host our vm “test_resize_vm” is provisioned and its flavor details + +``` +:~# openstack server show test_resize_vm | grep -E "flavor|hypervisor" +| OS-EXT-SRV-ATTR:hypervisor_hostname  | compute-57    | +| flavor                               | m1.small (2)  | +:~# +``` + +Login to VM as well and check the root partition size, + +``` +[[email protected] ~]# df -Th +Filesystem     Type      Size  Used Avail Use% Mounted on +/dev/vda1      xfs        20G  885M   20G   5% / +devtmpfs       devtmpfs  900M     0  900M   0% /dev +tmpfs          tmpfs     920M     0  920M   0% /dev/shm +tmpfs          tmpfs     920M  8.4M  912M   1% /run +tmpfs          tmpfs     920M     0  920M   0% /sys/fs/cgroup +tmpfs          tmpfs     184M     0  184M   0% /run/user/1000 +[[email protected] ~]# echo "test file for resize operation" > demofile +[[email protected] ~]# cat demofile +test file for resize operation +[[email protected] ~]# +``` + +Get the available flavor list using below command, + +``` +:~# openstack flavor list ++--------------------------------------|-----------------|-------|------|-----------|-------|-----------+ +| ID                                   | Name            |   RAM | Disk | Ephemeral | VCPUs | Is Public | ++--------------------------------------|-----------------|-------|------|-----------|-------|-----------+ +| 2                                    | m1.small        |  2048 |   20 |         0 |     1 | True      | +| 3                                    | m1.medium       |  4096 |   40 |         0 |     2 | True      | +| 4                                    | m1.large        |  8192 |   80 |         0 |     4 | True      | +| 5                                    | m1.xlarge       | 16384 |  160 |         0 |     8 | True      | ++--------------------------------------|-----------------|-------|------|-----------|-------|-----------+ +``` + +So we will be using the flavor “m1.medium” for resize operation, Run the beneath nova command to resize “test_resize_vm”, + +Syntax: # nova resize {VM_Name} {flavor_id} —poll + +``` +:~# nova resize test_resize_vm 3 --poll +Server resizing... 100% complete +Finished +:~# +``` + +Now confirm the resize operation using “ **openstack server –confirm”** command, + +``` +~# openstack server list | grep -i test_resize_vm +| 1d56f37f-94bd-4eef-9ff7-3dccb4682ce0 | test_resize_vm | VERIFY_RESIZE |private-net=10.20.10.51                                  | +:~# +``` + +As we can see in the above command output the current status of the vm is “ **verify_resize** “, execute below command to confirm resize, + +``` +~# openstack server resize --confirm 1d56f37f-94bd-4eef-9ff7-3dccb4682ce0 +~# +``` + +After the resize confirmation, status of VM will become active, now re-verify hypervisor and flavor details for the vm + +``` +:~# openstack server show test_resize_vm | grep -E "flavor|hypervisor" +| OS-EXT-SRV-ATTR:hypervisor_hostname  | compute-58   | +| flavor                               | m1.medium (3)| +``` + +Login to your VM now and verify the root partition size + +``` +[[email protected] ~]# df -Th +Filesystem     Type      Size  Used Avail Use% Mounted on +/dev/vda1      xfs        40G  887M   40G   3% / +devtmpfs       devtmpfs  1.9G     0  1.9G   0% /dev +tmpfs          tmpfs     1.9G     0  1.9G   0% /dev/shm +tmpfs          tmpfs     1.9G  8.4M  1.9G   1% /run +tmpfs          tmpfs     1.9G     0  1.9G   0% /sys/fs/cgroup +tmpfs          tmpfs     380M     0  380M   0% /run/user/1000 +[[email protected] ~]# cat demofile +test file for resize operation +[[email protected] ~]# +``` + +This confirm that VM root partition has been resized successfully. + +**Note:** Due to some reason if resize operation was not successful and you want to revert the vm back to previous state, then run the following command, + +``` +# openstack server resize --revert {instance_uuid} +``` + +If have noticed “ **openstack server show** ” commands output, VM is migrated from compute-57 to compute-58 after resize. This is the default behavior of “nova resize” command ( i.e nova resize command will migrate the instance to another compute & then resize it based on the flavor details) + +In case if you have only one compute node then nova resize will not work, but we can make it work by changing the below parameter in nova.conf file on compute node, + +Login to compute node, verify the parameter value + +If “ **allow_resize_to_same_host** ” is set as False then change it to True and restart the nova compute service. + +**Read More on** [**OpenStack Deployment using Devstack on CentOS 7 / RHEL 7 System**][2] + +That’s all from this tutorial, in case it helps you technically then please do share your feedback and comments. + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/resize-openstack-instance-command-line/ + +作者:[Pradeep Kumar][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lujun9972 +[1]: https://www.linuxtechi.com/create-delete-virtual-machine-command-line-openstack/ +[2]: https://www.linuxtechi.com/openstack-deployment-devstack-centos-7-rhel-7/ From 8a11dc4975795fabda7d3c63cdcf75ce8ff68ec3 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:23:20 +0800 Subject: [PATCH 046/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190124=20Orpie:?= =?UTF-8?q?=20A=20command-line=20reverse=20Polish=20notation=20calculator?= =?UTF-8?q?=20sources/tech/20190124=20Orpie-=20A=20command-line=20reverse?= =?UTF-8?q?=20Polish=20notation=20calculator.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...line reverse Polish notation calculator.md | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 sources/tech/20190124 Orpie- A command-line reverse Polish notation calculator.md diff --git a/sources/tech/20190124 Orpie- A command-line reverse Polish notation calculator.md b/sources/tech/20190124 Orpie- A command-line reverse Polish notation calculator.md new file mode 100644 index 0000000000..10e666f625 --- /dev/null +++ b/sources/tech/20190124 Orpie- A command-line reverse Polish notation calculator.md @@ -0,0 +1,128 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Orpie: A command-line reverse Polish notation calculator) +[#]: via: (https://opensource.com/article/19/1/orpie) +[#]: author: (Peter Faller https://opensource.com/users/peterfaller) + +Orpie: A command-line reverse Polish notation calculator +====== +Orpie is a scientific calculator that functions much like early, well-loved HP calculators. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calculator_money_currency_financial_tool.jpg?itok=2QMa1y8c) +Orpie is a text-mode [reverse Polish notation][1] (RPN) calculator for the Linux console. It works very much like the early, well-loved Hewlett-Packard calculators. + +### Installing Orpie + +RPM and DEB packages are available for most distributions, so installation is just a matter of using either: + +``` +$ sudo apt install orpie +``` + +or + +``` +$ sudo yum install orpie +``` + +Orpie has a comprehensive man page; new users may want to have it open in another terminal window as they get started. Orpie can be customized for each user by editing the **~/.orpierc** configuration file. The [orpierc(5)][2] man page describes the contents of this file, and **/etc/orpierc** describes the default configuration. + +### Starting up + +Start Orpie by typing **orpie** at the command line. The main screen shows context-sensitive help on the left and the stack on the right. The cursor, where you enter numbers you want to calculate, is at the bottom-right corner. + +![](https://opensource.com/sites/default/files/uploads/orpie_start.png) + +### Example calculation + +For a simple example, let's calculate the factorial of **5 (2 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 3 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 4 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 5)**. First the long way: + +| Keys | Result | +| --------- | --------- | +| 2 | Push 2 onto the stack | +| 3 | Push 3 onto the stack | +| * | Multiply to get 6 | +| 4 | Push 4 onto the stack | +| * | Multiply to get 24 | +| 5 | Push 5 onto the stack | +| * | Multiply to get 120 | + +Note that the multiplication happens as soon as you type *****. If you hit **< enter>** after ***** , Orpie will duplicate the value at position 1 on the stack. (If this happens, you can drop the duplicate with **\**.) + +Equivalent sequences are: + +| Keys | Result | +| ------------- | ------------- | +| 2 3 * 4 * 5 * | Faster! | +| 2 3 4 5 * * * | Same result | +| 5 ' fact | Fastest: Use the built-in function | + +Observe that when you enter **'** , the left pane changes to show matching functions as you type. In the example above, typing **fa** is enough to get the **fact** function. Orpie offers many functions—experiment by typing **'** and a few letters to see what's available. + +![](https://opensource.com/sites/default/files/uploads/orpie_functions.png) + +Note that each operation replaces one or more values on the stack. If you want to store the value at position 1 in the stack, key in (for example) **@factot ** and **S'**. To retrieve the value, key in (for example) **@factot ** then **;** (if you want to see it; otherwise just leave **@factot** as the value for the next calculation). + +### Constants and units + +Orpie understands units and predefines many useful scientific constants. For example, to calculate the energy in a blue light photon at 400nm, calculate **E=hc/(400nm)**. The key sequences are: + +| Keys | Result | +| -------------- | -------------- | +| C c | Get the speed of light in m/s | +| C h | Get Planck's constant in Js | +| * | Calculate h*c | +| 400 9 n _ m | Input 4 _ 10^-9 m | +| / | Do the division and get the result: 4.966 _ 10^-19 J | + +Like choosing functions after typing **'** , typing **C** shows matching constants based on what you type. + +![](https://opensource.com/sites/default/files/uploads/orpie_constants.png) + +### Matrices + +Orpie can also do operations with matrices. For example, to multiply two 2x2 matrices: + +| Keys | Result | +| -------- | -------- | +| [ 1 , 2 [ 3 , 4 | Stack contains the matrix [[ 1, 2 ][ 3, 4 ]] | +| [ 1 , 0 [ 1 , 1 | Push the multiplier matrix onto the stack | +| * | The result is: [[ 3, 2 ][ 7, 4 ]] | + +Note that the **]** characters are automatically inserted—entering **[** starts a new row. + +### Complex numbers + +Orpie can also calculate with complex numbers. They can be entered or displayed in either polar or rectangular form. You can toggle between the polar and rectangular display using the **p** key, and between degrees and radians using the **r** key. For example, to multiply **3 + 4i** by **4 + 4i** : + +| Keys | Result | +| -------- | -------- | +| ( 3 , 4 | The stack contains (3, 4) | +| ( 4 , 4 | Push (4, 4) | +| * | Get the result: (-4, 28) | + +Note that as you go, the results are kept on the stack so you can observe intermediate results in a lengthy calculation. + +![](https://opensource.com/sites/default/files/uploads/orpie_final.png) + +### Quitting Orpie + +You can exit from Orpie by typing **Q**. Your state is saved, so the next time you start Orpie, you'll find the stack as you left it. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/orpie + +作者:[Peter Faller][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/peterfaller +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Reverse_Polish_notation +[2]: https://github.com/pelzlpj/orpie/blob/master/doc/orpierc.5 From 3f48a7b6b7f58bc42c1cd386a393aaf0a63e8db9 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:24:50 +0800 Subject: [PATCH 047/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190123=20Dockte?= =?UTF-8?q?r:=20A=20container=20image=20builder=20for=20researchers=20sour?= =?UTF-8?q?ces/tech/20190123=20Dockter-=20A=20container=20image=20builder?= =?UTF-8?q?=20for=20researchers.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...container image builder for researchers.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20190123 Dockter- A container image builder for researchers.md diff --git a/sources/tech/20190123 Dockter- A container image builder for researchers.md b/sources/tech/20190123 Dockter- A container image builder for researchers.md new file mode 100644 index 0000000000..359d0c1d1e --- /dev/null +++ b/sources/tech/20190123 Dockter- A container image builder for researchers.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Dockter: A container image builder for researchers) +[#]: via: (https://opensource.com/article/19/1/dockter-image-builder-researchers) +[#]: author: (Nokome Bentley https://opensource.com/users/nokome) + +Dockter: A container image builder for researchers +====== +Dockter supports the specific requirements of researchers doing data analysis, including those using R. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/building_skyscaper_organization.jpg?itok=Ir5epxm8) + +Dependency hell is ubiquitous in the world of software for research, and this affects research transparency and reproducibility. Containerization is one solution to this problem, but it creates new challenges for researchers. Docker is gaining popularity in the research community—but using it efficiently requires solid Dockerfile writing skills. + +As a part of the [Stencila][1] project, which is a platform for creating, collaborating on, and sharing data-driven content, we are developing [Dockter][2], an open source tool that makes it easier for researchers to create Docker images for their projects. Dockter scans a research project's source code, generates a Dockerfile, and builds a Docker image. It has a range of features that allow flexibility and can help researchers learn more about working with Docker. + +Dockter also generates a JSON file with information about the software environment (based on [CodeMeta][3] and [Schema.org][4]) to enable further processing and interoperability with other tools. + +Several other projects create Docker images from source code and/or requirements files, including: [alibaba/derrick][5], [jupyter/repo2docker][6], [Gueils/whales][7], [o2r-project/containerit][8]; [openshift/source-to-image][9], and [ViDA-NYU/reprozip][10]. Dockter is similar to repo2docker, containerit, and ReproZip in that it is aimed at researchers doing data analysis (and supports R), whereas most other tools are aimed at software developers (and don't support R). + +Dockter differs from these projects principally in that it: + + * Performs static code analysis for multiple languages to determine package requirements + * Uses package databases to determine package system dependencies and generate linked metadata (containerit does this for R) + * Installs language package dependencies quicker (which can be useful during research projects where dependencies often change) + * By default but optionally, installs Stencila packages so that Stencila client interfaces can execute code in the container + + + +### Dockter's features + +Following are some of the ways researchers can use Dockter. + +#### Generating Docker images from code + +Dockter scans a research project folder and builds a Docker image for it. If the folder already has a Dockerfile, Dockter will build the image from that. If not, Dockter will scan the source code files in the folder and generate one. Dockter currently handles R, Python, and Node.js source code. The .dockerfile (with the dot at the beginning) it generates is fully editable so users can take over from Dockter and carry on with editing the file as they see fit. + +If the folder contains an R package [DESCRIPTION][11] file, Dockter will install the R packages listed under Imports into the image. If the folder does not contain a DESCRIPTION file, Dockter will scan all the R files in the folder for package import or usage statements and create a .DESCRIPTION file. + +If the folder contains a [requirements.txt][12] file for Python, Dockter will copy it into the Docker image and use [pip][13] to install the specified packages. If the folder does not contain either of those files, Dockter will scan all the folder's .py files for import statements and create a .requirements.txt file. + +If the folder contains a [package.json][14] file, Dockter will copy it into the Docker image and use npm to install the specified packages. If the folder does not contain a package.json file, Dockter will scan all the folder's .js files for require calls and create a .package.json file. + +#### Capturing system requirements automatically + +One of the headaches researchers face when hand-writing Dockerfiles is figuring out which system dependencies their project needs. Often this involves a lot of trial and error. Dockter automatically checks if any dependencies (or dependencies of dependencies, or dependencies of…) require system packages and installs those into the image. No more trial and error cycles of build, fail, add dependency, repeat… + +#### Reinstalling language packages faster + +If you have ever built a Docker image, you know it can be frustrating waiting for all your project's dependencies to reinstall when you add or remove just one. + +This happens because of Docker's layered filesystem: When you update a requirements file, Docker throws away all the subsequent layers—including the one where you previously installed your dependencies. That means all the packages have to be reinstalled. + +Dockter takes a different approach. It leaves the installation of language packages to the language package managers: Python's pip, Node.js's npm, and R's install.packages. These package managers are good at the job they were designed for: checking which packages need to be updated and updating only them. The result is much faster rebuilds, especially for R packages, which often involve compilation. + +Dockter does this by looking for a special **# dockter** comment in a Dockerfile. Instead of throwing away layers, it executes all instructions after this comment in the same layer—thereby reusing packages that were previously installed. + +#### Generating structured metadata for a project + +Dockter uses [JSON-LD][15] as its internal data structure. When it parses a project's source code, it generates a JSON-LD tree using vocabularies from schema.org and CodeMeta. + +Dockter also fetches metadata on a project's dependencies, which could be used to generate a complete software citation for the project. + +### Easy to pick up, easy to throw away + +Dockter is designed to make it easier to get started creating Docker images for your project. But it's also designed to not get in your way or restrict you from using bare Docker. You can easily and individually override any of the steps Dockter takes to build an image. + + * **Code analysis:** To stop Dockter from doing code analysis and specify your project's package dependencies, just remove the leading **.** (dot) from the .DESCRIPTION, .requirements.txt, or .package.json files. + + * **Dockerfile generation:** Dockter aims to generate readable Dockerfiles that conform to best practices. They include comments on what each section does and are a good way to start learning how to write your own Dockerfiles. To stop Dockter from generating a .Dockerfile and start editing it yourself, just rename it Dockerfile (without the leading dot). + + + + +### Install Dockter + +[Dockter is available][16] as pre-compiled, standalone command line tool or as a Node.js package. Click [here][17] for a demo. + +We welcome and encourage all [contributions][18]! + +A longer version of this article is available on the project's [GitHub page][19]. + +Aleksandra Pawlik will present [Building reproducible computing environments: a workshop for non-experts][20] at [linux.conf.au][21], January 21-25 in Christchurch, New Zealand. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/dockter-image-builder-researchers + +作者:[Nokome Bentley][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nokome +[b]: https://github.com/lujun9972 +[1]: https://stenci.la/ +[2]: https://stencila.github.io/dockter/ +[3]: https://codemeta.github.io/index.html +[4]: http://Schema.org +[5]: https://github.com/alibaba/derrick +[6]: https://github.com/jupyter/repo2docker +[7]: https://github.com/Gueils/whales +[8]: https://github.com/o2r-project/containerit +[9]: https://github.com/openshift/source-to-image +[10]: https://github.com/ViDA-NYU/reprozip +[11]: http://r-pkgs.had.co.nz/description.html +[12]: https://pip.readthedocs.io/en/1.1/requirements.html +[13]: https://pypi.org/project/pip/ +[14]: https://docs.npmjs.com/files/package.json +[15]: https://json-ld.org/ +[16]: https://github.com/stencila/dockter/releases/ +[17]: https://asciinema.org/a/pOHpxUqIVkGdA1dqu7bENyxZk?size=medium&cols=120&autoplay=1 +[18]: https://github.com/stencila/dockter/blob/master/CONTRIBUTING.md +[19]: https://github.com/stencila/dockter +[20]: https://2019.linux.conf.au/schedule/presentation/185/ +[21]: https://linux.conf.au/ From 4b4c6dc0ef1049df74f2db812c75ed521c9a5a55 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 15:26:29 +0800 Subject: [PATCH 048/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190122=20Get=20?= =?UTF-8?q?started=20with=20Go=20For=20It,=20a=20flexible=20to-do=20list?= =?UTF-8?q?=20application=20sources/tech/20190122=20Get=20started=20with?= =?UTF-8?q?=20Go=20For=20It,=20a=20flexible=20to-do=20list=20application.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...r It, a flexible to-do list application.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20190122 Get started with Go For It, a flexible to-do list application.md diff --git a/sources/tech/20190122 Get started with Go For It, a flexible to-do list application.md b/sources/tech/20190122 Get started with Go For It, a flexible to-do list application.md new file mode 100644 index 0000000000..56dde41884 --- /dev/null +++ b/sources/tech/20190122 Get started with Go For It, a flexible to-do list application.md @@ -0,0 +1,60 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Go For It, a flexible to-do list application) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-go-for-it) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with Go For It, a flexible to-do list application +====== +Go For It, the tenth in our series on open source tools that will make you more productive in 2019, builds on the Todo.txt system to help you get more things done. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_cafe_brew_laptop_desktop.jpg?itok=G-n1o1-o) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the tenth of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Go For It + +Sometimes what a person needs to be productive isn't a fancy kanban board or a set of notes, but a simple, straightforward to-do list. Something that is as basic as "add item to list, check it off when done." And for that, the [plain-text Todo.txt system][1] is possibly one of the easiest to use, and it's supported on almost every system out there. + +![](https://opensource.com/sites/default/files/uploads/go-for-it_1_1.png) + +[Go For It][2] is a simple, easy-to-use graphical interface for Todo.txt. It can be used with an existing file, if you are already using Todo.txt, and will create both a to-do and a done file if you aren't. It allows drag-and-drop ordering of tasks, allowing users to organize to-do items in the order they want to execute them. It also supports priorities, projects, and contexts, as outlined in the [Todo.txt format guidelines][3]. And, it can filter tasks by context or project simply by clicking on the project or context in the task list. + +![](https://opensource.com/sites/default/files/uploads/go-for-it_2.png) + +At first, Go For It may look the same as just about any other Todo.txt program, but looks can be deceiving. The real feature that sets Go For It apart is that it includes a built-in [Pomodoro Technique][4] timer. Select the task you want to complete, switch to the Timer tab, and click Start. When the task is done, simply click Done, and it will automatically reset the timer and pick the next task on the list. You can pause and restart the timer as well as click Skip to jump to the next task (or break). It provides a warning when 60 seconds are left for the current task. The default time for tasks is set at 25 minutes, and the default time for breaks is set at five minutes. You can adjust this in the Settings screen, as well as the location of the directory containing your Todo.txt and done.txt files. + +![](https://opensource.com/sites/default/files/uploads/go-for-it_3.png) + +Go For It's third tab, Done, allows you to look at the tasks you've completed and clean them out when you want. Being able to look at what you've accomplished can be very motivating and a good way to get a feel for where you are in a longer process. + +![](https://opensource.com/sites/default/files/uploads/go-for-it_4.png) + +It also has all of Todo.txt's other advantages. Go For It's list is accessible by other programs that use the same format, including [Todo.txt's original command-line tool][5] and any [add-ons][6] you've installed. + +Go For It seeks to be a simple tool to help manage your to-do list and get those items done. If you already use Todo.txt, Go For It is a fantastic addition to your toolkit, and if you don't, it's a really good way to start using one of the simplest and most flexible systems available. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-go-for-it + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: http://todotxt.org/ +[2]: http://manuel-kehl.de/projects/go-for-it/ +[3]: https://github.com/todotxt/todo.txt +[4]: https://en.wikipedia.org/wiki/Pomodoro_Technique +[5]: https://github.com/todotxt/todo.txt-cli +[6]: https://github.com/todotxt/todo.txt-cli/wiki/Todo.sh-Add-on-Directory From 2392636dbf30afe06682caebc7b41d35a8733514 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 17:11:35 +0800 Subject: [PATCH 049/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190123=20Mind?= =?UTF-8?q?=20map=20yourself=20using=20FreeMind=20and=20Fedora=20sources/t?= =?UTF-8?q?ech/20190123=20Mind=20map=20yourself=20using=20FreeMind=20and?= =?UTF-8?q?=20Fedora.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... map yourself using FreeMind and Fedora.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20190123 Mind map yourself using FreeMind and Fedora.md diff --git a/sources/tech/20190123 Mind map yourself using FreeMind and Fedora.md b/sources/tech/20190123 Mind map yourself using FreeMind and Fedora.md new file mode 100644 index 0000000000..146f95752a --- /dev/null +++ b/sources/tech/20190123 Mind map yourself using FreeMind and Fedora.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mind map yourself using FreeMind and Fedora) +[#]: via: (https://fedoramagazine.org/mind-map-yourself-using-freemind-and-fedora/) +[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) + +Mind map yourself using FreeMind and Fedora +====== +![](https://fedoramagazine.org/wp-content/uploads/2019/01/freemind-816x345.jpg) + +A mind map of yourself sounds a little far-fetched at first. Is this process about neural pathways? Or telepathic communication? Not at all. Instead, a mind map of yourself is a way to describe yourself to others visually. It also shows connections among the characteristics you use to describe yourself. It’s a useful way to share information with others in a clever but also controllable way. You can use any mind map application for this purpose. This article shows you how to get started using [FreeMind][1], available in Fedora. + +### Get the application + +The FreeMind application has been around a while. While the UI is a bit dated and could use a refresh, it’s a powerful app that offers many options for building mind maps. And of course it’s 100% open source. There are other mind mapping apps available for Fedora and Linux users, as well. Check out [this previous article that covers several mind map options][2]. + +Install FreeMind from the Fedora repositories using the Software app if you’re running Fedora Workstation. Or use this [sudo][3] command in a terminal: + +``` +$ sudo dnf install freemind +``` + +You can launch the app from the GNOME Shell Overview in Fedora Workstation. Or use the application start service your desktop environment provides. FreeMind shows you a new, blank map by default: + +![][4] +FreeMind initial (blank) mind map + +A map consists of linked items or descriptions — nodes. When you think of something related to a node you want to capture, simply create a new node connected to it. + +### Mapping yourself + +Click in the initial node. Replace it with your name by editing the text and hitting **Enter**. You’ve just started your mind map. + +What would you think of if you had to fully describe yourself to someone? There are probably many things to cover. How do you spend your time? What do you enjoy? What do you dislike? What do you value? Do you have a family? All of this can be captured in nodes. + +To add a node connection, select the existing node, and hit **Insert** , or use the “light bulb” icon for a new child node. To add another node at the same level as the new child, use **Enter**. + +Don’t worry if you make a mistake. You can use the **Delete** key to remove an unwanted node. There’s no rules about content. Short nodes are best, though. They allow your mind to move quickly when creating the map. Concise nodes also let viewers scan and understand the map easily later. + +This example uses nodes to explore each of these major categories: + +![][5] +Personal mind map, first level + +You could do another round of iteration for each of these areas. Let your mind freely connect ideas to generate the map. Don’t worry about “getting it right.” It’s better to get everything out of your head and onto the display. Here’s what a next-level map might look like. + +![][6] +Personal mind map, second level + +You could expand on any of these nodes in the same way. Notice how much information you can quickly understand about John Q. Public in the example. + +### How to use your personal mind map + +This is a great way to have team or project members introduce themselves to each other. You can apply all sorts of formatting and color to the map to give it personality. These are fun to do on paper, of course. But having one on your Fedora system means you can always fix mistakes, or even make changes as you change. + +Have fun exploring your personal mind map! + + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/mind-map-yourself-using-freemind-and-fedora/ + +作者:[Paul W. Frields][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/pfrields/ +[b]: https://github.com/lujun9972 +[1]: http://freemind.sourceforge.net/wiki/index.php/Main_Page +[2]: https://fedoramagazine.org/three-mind-mapping-tools-fedora/ +[3]: https://fedoramagazine.org/howto-use-sudo/ +[4]: https://fedoramagazine.org/wp-content/uploads/2019/01/Screenshot-from-2019-01-19-15-17-04-1024x736.png +[5]: https://fedoramagazine.org/wp-content/uploads/2019/01/Screenshot-from-2019-01-19-15-32-38-1024x736.png +[6]: https://fedoramagazine.org/wp-content/uploads/2019/01/Screenshot-from-2019-01-19-15-38-00-1024x736.png From 257fd061a813a238dae0461e7d647619a708a887 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 17:15:21 +0800 Subject: [PATCH 050/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190124=20ffsend?= =?UTF-8?q?=20=E2=80=93=20Easily=20And=20Securely=20Share=20Files=20From?= =?UTF-8?q?=20Linux=20Command=20Line=20Using=20Firefox=20Send=20Client=20s?= =?UTF-8?q?ources/tech/20190124=20ffsend=20-=20Easily=20And=20Securely=20S?= =?UTF-8?q?hare=20Files=20From=20Linux=20Command=20Line=20Using=20Firefox?= =?UTF-8?q?=20Send=20Client.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Command Line Using Firefox Send Client.md | 330 ++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 sources/tech/20190124 ffsend - Easily And Securely Share Files From Linux Command Line Using Firefox Send Client.md diff --git a/sources/tech/20190124 ffsend - Easily And Securely Share Files From Linux Command Line Using Firefox Send Client.md b/sources/tech/20190124 ffsend - Easily And Securely Share Files From Linux Command Line Using Firefox Send Client.md new file mode 100644 index 0000000000..fcbdd3c5c7 --- /dev/null +++ b/sources/tech/20190124 ffsend - Easily And Securely Share Files From Linux Command Line Using Firefox Send Client.md @@ -0,0 +1,330 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (ffsend – Easily And Securely Share Files From Linux Command Line Using Firefox Send Client) +[#]: via: (https://www.2daygeek.com/ffsend-securely-share-files-folders-from-linux-command-line-using-firefox-send-client/) +[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/) + +ffsend – Easily And Securely Share Files From Linux Command Line Using Firefox Send Client +====== + +Linux users were preferred to go with scp or rsync for files or folders copy. + +However, so many new options are coming to Linux because it’s a opensource. + +Anyone can develop a secure software for Linux. + +We had written multiple articles in our site in the past about this topic. + +Even, today we are going to discuss the same kind of topic called ffsend. + +Those are **[OnionShare][1]** , **[Magic Wormhole][2]** , **[Transfer.sh][3]** and **[Dcp – Dat Copy][4]**. + +### What’s ffsend? + +[ffsend][5] is a command line Firefox Send client that allow users to transfer and receive files and folders through command line. + +It allow us to easily and securely share files and directories from the command line through a safe, private and encrypted link using a single simple command. + +Files are shared using the Send service and the allowed file size is up to 2GB. + +Others are able to download these files with this tool, or through their web browser. + +All files are always encrypted on the client, and secrets are never shared with the remote host. + +Additionally you can add a password for the file upload. + +The uploaded files will be removed after the download (default count is 1 up to 10) or after 24 hours. This will make sure that your files does not remain online forever. + +This tool is currently in the alpha phase. Use at your own risk. Also, only limited installation options are available right now. + +### ffsend Features: + + * Fully featured and friendly command line tool + * Upload and download files and directories securely + * Always encrypted on the client + * Additional password protection, generation and configurable download limits + * Built-in file and directory archiving and extraction + * History tracking your files for easy management + * Ability to use your own Send host + * Inspect or delete shared files + * Accurate error reporting + * Low memory footprint, due to encryption and download/upload streaming + * Intended to be used in scripts without interaction + + + +### How To Install ffsend in Linux? + +There is no package for each distributions except Debian and Arch Linux systems. However, we can easily get this utility by downloading the prebuilt appropriate binaries file based on the operating system and architecture. + +Run the below command to download the latest available version for your operating system. + +``` +$ wget https://github.com/timvisee/ffsend/releases/download/v0.1.2/ffsend-v0.1.2-linux-x64.tar.gz +``` + +Extract the tar archive using the following command. + +``` +$ tar -xvf ffsend-v0.1.2-linux-x64.tar.gz +``` + +Run the following command to identify your path variable. + +``` +$ echo $PATH +/home/daygeek/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl +``` + +As i told previously, just move the executable file to your path directory. + +``` +$ sudo mv ffsend /usr/local/sbin +``` + +Run the `ffsend` command alone to get the basic usage information. + +``` +$ ffsend +ffsend 0.1.2 +Usage: ffsend [FLAGS] ... + +Easily and securely share files from the command line. +A fully featured Firefox Send client. + +Missing subcommand. Here are the most used: + ffsend upload ... + ffsend download ... + +To show all subcommands, features and other help: + ffsend help [SUBCOMMAND] +``` + +For Arch Linux based users can easily install it with help of **[AUR Helper][6]** , as this package is available in AUR repository. + +``` +$ yay -S ffsend +``` + +For **`Debian/Ubuntu`** systems, use **[DPKG Command][7]** to install ffsend. + +``` +$ wget https://github.com/timvisee/ffsend/releases/download/v0.1.2/ffsend_0.1.2_amd64.deb +$ sudo dpkg -i ffsend_0.1.2_amd64.deb +``` + +### How To Send A File Using ffsend? + +It’s not complicated. We can easily send a file using simple syntax. + +**Syntax:** + +``` +$ ffsend upload [/Path/to/the/file/name] +``` + +In the following example, we are going to upload a file called `passwd-up1.sh`. Once you upload the file then you will be getting the unique URL. + +``` +$ ffsend upload passwd-up1.sh --copy +Upload complete +Share link: https://send.firefox.com/download/a4062553f4/#yy2_VyPaUMG5HwXZzYRmpQ +``` + +![][9] + +Just download the above unique URL to get the file in any remote system. + +**Syntax:** + +``` +$ ffsend download [Generated URL] +``` + +Output for the above command. + +``` +$ ffsend download https://send.firefox.com/download/a4062553f4/#yy2_VyPaUMG5HwXZzYRmpQ +Download complete +``` + +![][10] + +Use the following syntax format for directory upload. + +``` +$ ffsend upload [/Path/to/the/Directory] --copy +``` + +In this example, we are going to upload `2g` directory. + +``` +$ ffsend upload /home/daygeek/2g --copy +You've selected a directory, only a single file may be uploaded. +Archive the directory into a single file? [Y/n]: y +Archiving... +Upload complete +Share link: https://send.firefox.com/download/90aa5cfe67/#hrwu6oXZRG2DNh8vOc3BGg +``` + +Just download the above generated the unique URL to get a folder in any remote system. + +``` +$ ffsend download https://send.firefox.com/download/90aa5cfe67/#hrwu6oXZRG2DNh8vOc3BGg +You're downloading an archive, extract it into the selected directory? [Y/n]: y +Extracting... +Download complete +``` + +As this already send files through a safe, private, and encrypted link. However, if you would like to add a additional security at your level. Yes, you can add a password for a file. + +``` +$ ffsend upload file-copy-rsync.sh --copy --password +Password: +Upload complete +Share link: https://send.firefox.com/download/0742d24515/#P7gcNiwZJ87vF8cumU71zA +``` + +It will prompt you to update a password when you are trying to download a file in the remote system. + +``` +$ ffsend download https://send.firefox.com/download/0742d24515/#P7gcNiwZJ87vF8cumU71zA +This file is protected with a password. +Password: +Download complete +``` + +Alternatively you can limit a download speed by providing the download speed while uploading a file. + +``` +$ ffsend upload file-copy-scp.sh --copy --downloads 10 +Upload complete +Share link: https://send.firefox.com/download/23cb923c4e/#LVg6K0CIb7Y9KfJRNZDQGw +``` + +Just download the above unique URL to get a file in any remote system. + +``` +ffsend download https://send.firefox.com/download/23cb923c4e/#LVg6K0CIb7Y9KfJRNZDQGw +Download complete +``` + +If you want to see more details about the file, use the following format. It will shows you the file name, file size, Download counts and when it will going to expire. + +**Syntax:** + +``` +$ ffsend info [Generated URL] + +$ ffsend info https://send.firefox.com/download/23cb923c4e/#LVg6K0CIb7Y9KfJRNZDQGw +ID: 23cb923c4e +Name: file-copy-scp.sh +Size: 115 B +MIME: application/x-sh +Downloads: 3 of 10 +Expiry: 23h58m (86280s) +``` + +You can view your transaction history using the following format. + +``` +$ ffsend history +# LINK EXPIRY +1 https://send.firefox.com/download/23cb923c4e/#LVg6K0CIb7Y9KfJRNZDQGw 23h57m +2 https://send.firefox.com/download/0742d24515/#P7gcNiwZJ87vF8cumU71zA 23h55m +3 https://send.firefox.com/download/90aa5cfe67/#hrwu6oXZRG2DNh8vOc3BGg 23h52m +4 https://send.firefox.com/download/a4062553f4/#yy2_VyPaUMG5HwXZzYRmpQ 23h46m +5 https://send.firefox.com/download/74ff30e43e/#NYfDOUp_Ai-RKg5g0fCZXw 23h44m +6 https://send.firefox.com/download/69afaab1f9/#5z51_94jtxcUCJNNvf6RcA 23h43m +``` + +If you don’t want the link anymore then we can delete it. + +**Syntax:** + +``` +$ ffsend delete [Generated URL] + +$ ffsend delete https://send.firefox.com/download/69afaab1f9/#5z51_94jtxcUCJNNvf6RcA +File deleted +``` + +Alternatively this can be done using firefox browser by opening the page . + +Just drag and drop a file to upload it. +![][11] + +Once the file is downloaded, it will show you that 100% download completed. +![][12] + +To check other possible options, navigate to man page or help page. + +``` +$ ffsend --help +ffsend 0.1.2 +Tim Visee +Easily and securely share files from the command line. +A fully featured Firefox Send client. + +USAGE: + ffsend [FLAGS] [OPTIONS] [SUBCOMMAND] + +FLAGS: + -f, --force Force the action, ignore warnings + -h, --help Prints help information + -i, --incognito Don't update local history for actions + -I, --no-interact Not interactive, do not prompt + -q, --quiet Produce output suitable for logging and automation + -V, --version Prints version information + -v, --verbose Enable verbose information and logging + -y, --yes Assume yes for prompts + +OPTIONS: + -H, --history Use the specified history file [env: FFSEND_HISTORY] + -t, --timeout Request timeout (0 to disable) [env: FFSEND_TIMEOUT] + -T, --transfer-timeout Transfer timeout (0 to disable) [env: FFSEND_TRANSFER_TIMEOUT] + +SUBCOMMANDS: + upload Upload files [aliases: u, up] + download Download files [aliases: d, down] + debug View debug information [aliases: dbg] + delete Delete a shared file [aliases: del] + exists Check whether a remote file exists [aliases: e] + help Prints this message or the help of the given subcommand(s) + history View file history [aliases: h] + info Fetch info about a shared file [aliases: i] + parameters Change parameters of a shared file [aliases: params] + password Change the password of a shared file [aliases: pass, p] + +The public Send service that is used as default host is provided by Mozilla. +This application is not affiliated with Mozilla, Firefox or Firefox Send. +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/ffsend-securely-share-files-folders-from-linux-command-line-using-firefox-send-client/ + +作者:[Vinoth Kumar][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/vinoth/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/onionshare-secure-way-to-share-files-sharing-tool-linux/ +[2]: https://www.2daygeek.com/wormhole-securely-share-files-from-linux-command-line/ +[3]: https://www.2daygeek.com/transfer-sh-easy-fast-way-share-files-over-internet-from-command-line/ +[4]: https://www.2daygeek.com/dcp-dat-copy-secure-way-to-transfer-files-between-linux-systems/ +[5]: https://github.com/timvisee/ffsend +[6]: https://www.2daygeek.com/category/aur-helper/ +[7]: https://www.2daygeek.com/dpkg-command-to-manage-packages-on-debian-ubuntu-linux-mint-systems/ +[8]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[9]: https://www.2daygeek.com/wp-content/uploads/2019/01/ffsend-easily-and-securely-share-files-from-linux-command-line-using-firefox-send-client-1.png +[10]: https://www.2daygeek.com/wp-content/uploads/2019/01/ffsend-easily-and-securely-share-files-from-linux-command-line-using-firefox-send-client-2.png +[11]: https://www.2daygeek.com/wp-content/uploads/2019/01/ffsend-easily-and-securely-share-files-from-linux-command-line-using-firefox-send-client-3.png +[12]: https://www.2daygeek.com/wp-content/uploads/2019/01/ffsend-easily-and-securely-share-files-from-linux-command-line-using-firefox-send-client-4.png From 80fd194842eda72d4832472b130b4b8513346468 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 17:18:01 +0800 Subject: [PATCH 051/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190123=20Book?= =?UTF-8?q?=20Review:=20Fundamentals=20of=20Linux=20sources/talk/20190123?= =?UTF-8?q?=20Book=20Review-=20Fundamentals=20of=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...0123 Book Review- Fundamentals of Linux.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/talk/20190123 Book Review- Fundamentals of Linux.md diff --git a/sources/talk/20190123 Book Review- Fundamentals of Linux.md b/sources/talk/20190123 Book Review- Fundamentals of Linux.md new file mode 100644 index 0000000000..5e0cffd9bc --- /dev/null +++ b/sources/talk/20190123 Book Review- Fundamentals of Linux.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Book Review: Fundamentals of Linux) +[#]: via: (https://itsfoss.com/fundamentals-of-linux-book-review) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +Book Review: Fundamentals of Linux +====== + +There are many great books that cover the basics of what Linux is and how it works. Today, I will be taking a look at one such book. Today, the subject of our discussion is [Fundamentals of Linux][1] by Oliver Pelz and is published by [PacktPub][2]. + +[Oliver Pelz][3] has over ten years of experience as a software developer and a system administrator. He holds a degree in bioinformatics. + +### What is the book ‘Fundamentals of Linux’ about? + +![Fundamental of Linux books][4] + +As can be guessed from the title, the goal of Fundamentals of Linux is to give the reader a strong foundation from which to learn about the Linux command line. The book is a little over two hundred pages long, so it only focuses on teaching the everyday tasks and problems that users commonly encounter. The book is designed for readers who want to become Linux administrators. + +The first chapter starts out by giving an overview of virtualization. From there the author instructs how to create a virtual instance of [CentOS][5] in [VirtualBox][6], how to clone it, and how to use snapshots. You will also learn how to connect to the virtual machines via SSH. + +The second chapter covers the basics of the Linux command line. This includes shell globbing, shell expansion, how to work with file names that contain spaces or special characters. It also explains how to interpret a command’s manual page, as well as, how to use `sed`, `awk`, and to navigate the Linux file system. + +The third chapter takes a more in-depth look at the Linux file system. You will learn how files are linked in Linux and how to search for them. You will also be given an overview of users, groups and file permissions. Since the chapter focuses on interacting with files, it tells how to read text files from the command line, as well as, an overview of how to use the VIM editor. + +Chapter four focuses on using the command line. It covers important commands, such as `cat`, `sort`, `awk`. `tee`, `tar`, `rsync`, `nmap`, `htop` and more. You will learn what processes are and how they communicate with each other. This chapter also includes an introduction to Bash shell scripting. + +The fifth and final chapter covers networking on Linux and other advanced command line concepts. The author discusses how Linux handles networking and gives examples using multiple virtual machines. He also covers how to install new programs and how to set up a firewall. + +### Thoughts on the book + +Fundamentals of Linux might seem short at five chapters and a little over two hundred pages. However, quite a bit of information is covered. You are given everything that you need to get going on the command line. + +The book’s sole focus on the command line is one thing to keep in mind. You won’t get any information on how to use a graphical user interface. That is partially because Linux has so many different desktop environments and so many similar system applications that it would be hard to write a book that could cover all of the variables. It is also partially because the book is aimed at potential Linux administrators. + +I was kinda surprised to see that the author used [CentOS][7] to teach Linux. I would have expected him to use a more common Linux distro, like Ubuntu, Debian, or Fedora. However, because it is a distro designed for servers very little changes over time, so it is a very stable basis for a course on Linux basics. + +I’ve used Linux for over half a decade. I spent most of that time using desktop Linux. I dove into the terminal when I needed to, but didn’t spend lots of time there. I have performed many of the actions covered in this book using a mouse. Now, I know how to do the same things via the terminal. It won’t change the way I do my tasks, but it will help me understand what goes on behind the curtain. + +If you have either just started using Linux or are planning to do so in the future, I would not recommend this book. It might be a little overwhelming. If you have already spent some time with Linux or can quickly grasp the technical language, this book may very well be for you. + +If you think this book is apt for your learning needs, you can get the book from the link below: + +We will be trying to review more Linux books in coming months so stay tuned with us. + +What is your favorite introductory book on Linux? Let us know in the comments below. + +If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][8]. + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fundamentals-of-linux-book-review + +作者:[John Paul][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://www.packtpub.com/networking-and-servers/fundamentals-linux +[2]: https://www.packtpub.com/ +[3]: http://www.oliverpelz.de/index.html +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/fundamentals-of-linux-book-review.jpeg?resize=800%2C450&ssl=1 +[5]: https://centos.org/ +[6]: https://www.virtualbox.org/ +[7]: https://www.centos.org/ +[8]: http://reddit.com/r/linuxusersgroup From adb460d03ae6ada6ad41c61e20c8d6c4ac0fbd97 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 17:22:08 +0800 Subject: [PATCH 052/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190119=20Get=20?= =?UTF-8?q?started=20with=20Roland,=20a=20random=20selection=20tool=20for?= =?UTF-8?q?=20the=20command=20line=20sources/tech/20190119=20Get=20started?= =?UTF-8?q?=20with=20Roland,=20a=20random=20selection=20tool=20for=20the?= =?UTF-8?q?=20command=20line.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dom selection tool for the command line.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md diff --git a/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md b/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md new file mode 100644 index 0000000000..1bfeb92c0c --- /dev/null +++ b/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md @@ -0,0 +1,90 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Roland, a random selection tool for the command line) +[#]: via: (https://opensource.com/article/19/1/productivity-tools-roland) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with Roland, a random selection tool for the command line +====== + +Get help making hard choices with Roland, the seventh in our series on open source tools that will make you more productive in 2019. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/dice_tabletop_board_gaming_game.jpg?itok=y93eW7HN) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the seventh of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Roland + +By the time the workday has ended, often the only thing I want to think about is hitting the couch and playing the video game of the week. But even though my professional obligations stop at the end of the workday, I still have to manage my household. Laundry, pet care, making sure my teenager has what he needs, and most important: deciding what to make for dinner. + +Like many people, I often suffer from [decision fatigue][1], and I make less-than-healthy choices for dinner based on speed, ease of preparation, and (quite frankly) whatever causes me the least stress. + +![](https://opensource.com/sites/default/files/uploads/roland-1.png) + +[Roland][2] makes planning my meals much easier. Roland is a Perl application designed for tabletop role-playing games. It picks randomly from a list of items, such as monsters and hirelings. In essence, Roland does the same thing at the command line that a game master does when rolling physical dice to look up things in a table from the Game Master's Big Book of Bad Things to Do to Players. + +With minor modifications, Roland can do so much more. For example, just by adding a table, I can enable Roland to help me choose what to cook for dinner. + +The first step is installing Roland and all its dependencies. + +``` +git clone git@github.com:rjbs/Roland.git +cpan install Getopt::Long::Descriptive Moose \ +   namespace::autoclean List:AllUtils Games::Dice \ +   Sort::ByExample Data::Bucketeer Text::Autoformat \ +   YAML::XS +cd oland +``` + +Next, I create a YAML document named **dinner** and enter all our meal options. + +``` +type: list +pick: 1 +items: + - "frozen pizza" + - "chipotle black beans" + - "huevos rancheros" + - "nachos" + - "pork roast" + - "15 bean soup" + - "roast chicken" + - "pot roast" + - "grilled cheese sandwiches" +``` + +Running the command **bin/roland dinner** will read the file and pick one of the options. + +![](https://opensource.com/sites/default/files/uploads/roland-2.png) + +I like to plan for the week ahead so I can shop for all my ingredients in advance. The **pick** command determines how many items from the list to chose, and right now, the **pick** option is set to 1. If I want to plan a full week's dinner menu, I can just change **pick: 1** to **pick: 7** and it will give me a week's worth of dinners. You can also use the **-m** command line option to manually enter the choices. + +![](https://opensource.com/sites/default/files/uploads/roland-3.png) + +You can also do fun things with Roland, like adding a file named **8ball** with some classic phrases. + +![](https://opensource.com/sites/default/files/uploads/roland-4.png) + +You can create all kinds of files to help with common decisions that seem so stressful after a long day of work. And even if you don't use it for that, you can still use it to decide which devious trap to set up for tonight's game. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tools-roland + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Decision_fatigue +[2]: https://github.com/rjbs/Roland From 441b66b06b1f9210858c441077f044afcd9d7a52 Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 17:55:20 +0800 Subject: [PATCH 053/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190122=20Dcp=20?= =?UTF-8?q?(Dat=20Copy)=20=E2=80=93=20Easy=20And=20Secure=20Way=20To=20Tra?= =?UTF-8?q?nsfer=20Files=20Between=20Linux=20Systems=20sources/tech/201901?= =?UTF-8?q?22=20Dcp=20(Dat=20Copy)=20-=20Easy=20And=20Secure=20Way=20To=20?= =?UTF-8?q?Transfer=20Files=20Between=20Linux=20Systems.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...To Transfer Files Between Linux Systems.md | 177 ++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 sources/tech/20190122 Dcp (Dat Copy) - Easy And Secure Way To Transfer Files Between Linux Systems.md diff --git a/sources/tech/20190122 Dcp (Dat Copy) - Easy And Secure Way To Transfer Files Between Linux Systems.md b/sources/tech/20190122 Dcp (Dat Copy) - Easy And Secure Way To Transfer Files Between Linux Systems.md new file mode 100644 index 0000000000..b6499932ae --- /dev/null +++ b/sources/tech/20190122 Dcp (Dat Copy) - Easy And Secure Way To Transfer Files Between Linux Systems.md @@ -0,0 +1,177 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Dcp (Dat Copy) – Easy And Secure Way To Transfer Files Between Linux Systems) +[#]: via: (https://www.2daygeek.com/dcp-dat-copy-secure-way-to-transfer-files-between-linux-systems/) +[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/) + +Dcp (Dat Copy) – Easy And Secure Way To Transfer Files Between Linux Systems +====== + +Linux has native command to perform this task nicely using scp and rsync. However, we need to try new things. + +Also, we need to encourage the developers who is working new things with different concept and new technology. + +We also written few articles about these kind of topic, you can navigate those by clicking the below appropriate links. + +Those are **[OnionShare][1]** , **[Magic Wormhole][2]** , **[Transfer.sh][3]** and **ffsend**. + +### What’s Dcp? + +[dcp][4] copies files between hosts on a network using the peer-to-peer Dat network. + +dcp can be seen as an alternative to tools like scp, removing the need to configure SSH access between hosts. + +This lets you transfer files between two remote hosts, without you needing to worry about the specifics of how said hosts reach each other and regardless of whether hosts are behind NATs. + +dcp requires zero configuration and is secure, fast, and peer-to-peer. Also, this is not production-ready software. Use at your own risk. + +### What’s Dat Protocol? + +Dat is a peer-to-peer protocol. A community-driven project powering a next-generation Web. + +### How dcp works: + +dcp will create a dat archive for a specified set of files or directories and, using the generated public key, lets you download said archive from a second host. + +Any data shared over the network is encrypted using the public key of the archive, meaning data access is limited to those who have access to said key. + +### dcp Use cases: + + * Send files to multiple colleagues – just send the generated public key via chat and they can receive the files on their machine. + * Sync files between two physical computers on your local network, without needing to set up SSH access. + * Easily send files to a friend without needing to create a zip and upload it the cloud. + * Copy files to a remote server when you have shell access but not SSH, for example on a kubernetes pod. + * Share files between Linux/macOS and Windows, which isn’t exactly known for great SSH support. + + + +### How To Install NodeJS & npm in Linux? + +dcp package was written in JavaScript programming language so, we need to install NodeJS as a prerequisites to install dcp. Use the following command to install NodeJS in Linux. + +For **`Fedora`** system, use **[DNF Command][5]** to install NodeJS & npm. + +``` +$ sudo dnf install nodejs npm +``` + +For **`Debian/Ubuntu`** systems, use **[APT-GET Command][6]** or **[APT Command][7]** to install NodeJS & npm. + +``` +$ sudo apt install nodejs npm +``` + +For **`Arch Linux`** based systems, use **[Pacman Command][8]** to install NodeJS & npm. + +``` +$ sudo pacman -S nodejs npm +``` + +For **`RHEL/CentOS`** systems, use **[YUM Command][9]** to install NodeJS & npm. + +``` +$ sudo yum install epel-release +$ sudo yum install nodejs npm +``` + +For **`openSUSE Leap`** system, use **[Zypper Command][10]** to install NodeJS & npm. + +``` +$ sudo zypper nodejs6 +``` + +### How To Install dcp in Linux? + +Once you have installed the NodeJS, use the following npm command to install dcp. + +npm is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js. + +``` +# npm i -g dat-cp +``` + +### How to Send Files Through dcp? + +Enter the files or folders which you want to transfer to remote server followed by the dcp command, And no need to mention the destination machine name. + +``` +# dcp [File Name Which You Want To Transfer] +``` + +It will generate a dat archive for the given file when you ran the dcp command. Once it’s done then it will geerate a public key at the bottom of the page. + +### How To Receive Files Through dcp? + +Enter the generated the public key on remote server to receive the files or folders. + +``` +# dcp [Public Key] +``` + +To recursively copy directories. + +``` +# dcp [Folder Name Which You Want To Transfer] -r +``` + +In the following example, we are going to transfer a single file. +![][12] + +Output for the above file transfer. +![][13] + +If you want to send more than one file, use the following format. +![][14] + +Output for the above file transfer. +![][15] + +To recursively copy directories. +![][16] + +Output for the above folder transfer. +![][17] + +It won’t allow you to download the files or folders in second time. It means once you downloaded the files or folders then immediately the link will be expired. +![][18] + +Navigate to man page to know about other options. + +``` +# dcp --help +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/dcp-dat-copy-secure-way-to-transfer-files-between-linux-systems/ + +作者:[Vinoth Kumar][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/vinoth/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/onionshare-secure-way-to-share-files-sharing-tool-linux/ +[2]: https://www.2daygeek.com/wormhole-securely-share-files-from-linux-command-line/ +[3]: https://www.2daygeek.com/transfer-sh-easy-fast-way-share-files-over-internet-from-command-line/ +[4]: https://github.com/tom-james-watson/dat-cp +[5]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/ +[6]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ +[7]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ +[8]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/ +[9]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/ +[10]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/ +[11]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[12]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-1.png +[13]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-2.png +[14]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-3.jpg +[15]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-4.jpg +[16]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-6.jpg +[17]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-7.jpg +[18]: https://www.2daygeek.com/wp-content/uploads/2019/01/Dcp-Dat-Copy-Easy-And-Secure-Way-To-Transfer-Files-Between-Linux-Systems-5.jpg From 7463be52e586bcddb6511eb951a30d3c2f1e3b0b Mon Sep 17 00:00:00 2001 From: darksun Date: Mon, 28 Jan 2019 17:57:11 +0800 Subject: [PATCH 054/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190121=20Get=20?= =?UTF-8?q?started=20with=20TaskBoard,=20a=20lightweight=20kanban=20board?= =?UTF-8?q?=20sources/tech/20190121=20Get=20started=20with=20TaskBoard,=20?= =?UTF-8?q?a=20lightweight=20kanban=20board.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...h TaskBoard, a lightweight kanban board.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md diff --git a/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md b/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md new file mode 100644 index 0000000000..e77e5e3b1c --- /dev/null +++ b/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md @@ -0,0 +1,59 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with TaskBoard, a lightweight kanban board) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-taskboard) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with TaskBoard, a lightweight kanban board +====== +Check out the ninth tool in our series on open source tools that will make you more productive in 2019. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the ninth of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### TaskBoard + +As I wrote in the [second article][1] in this series, [kanban boards][2] are pretty popular these days. And not all kanban boards are created equal. [TaskBoard][3] is a PHP application that is easy to set up on an existing web server and has a set of functions that make it easy to use and manage. + +![](https://opensource.com/sites/default/files/uploads/taskboard-1.png) + +[Installation][4] is as simple as unzipping the files on your web server, running a script or two, and making sure the correct directories are accessible. The first time you start it up, you're presented with a login form, and then it's time to start adding users and making boards. Board creation options include adding the columns you want to use and setting the default color of the cards. You can also assign users to boards so everyone sees only the boards they need to see. + +User management is lightweight, and all accounts are local to the server. You can set a default board for everyone on the server, and users can set their own default boards, too. These options can be useful when someone works on one board more than others. + +![](https://opensource.com/sites/default/files/uploads/taskboard-2.png) + +TaskBoard also allows you to create automatic actions, which are actions taken upon changes to user assignment, columns, or card categories. Although TaskBoard is not as powerful as some other kanban apps, you can set up automatic actions to make cards more visible for board users, clear due dates, and auto-assign new cards to people as needed. For example, in the screenshot below, if a card is assigned to the "admin" user, its color is changed to red, and when a card is assigned to my user, its color is changed to teal. I've also added an action to clear an item's due date if it's added to the "To-Do" column and to auto-assign cards to my user when that happens. + +![](https://opensource.com/sites/default/files/uploads/taskboard-3.png) + +The cards are very straightforward. While they don't have a start date, they do have end dates and a points field. Points can be used for estimating the time needed, effort required, or just general priority. Using points is optional, but if you are using TaskBoard for scrum planning or other agile techniques, it is a really handy feature. You can also filter the view by users and categories. This can be helpful on a team with multiple work streams going on, as it allows a team lead or manager to get status information about progress or a person's workload. + +![](https://opensource.com/sites/default/files/uploads/taskboard-4.png) + +If you need a reasonably lightweight kanban board, check out TaskBoard. It installs quickly, has some nice features, and is very, very easy to use. It's also flexible enough to be used for development teams, personal task tracking, and a whole lot more. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-taskboard + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/article/19/1/productivity-tool-wekan +[2]: https://en.wikipedia.org/wiki/Kanban +[3]: https://taskboard.matthewross.me/ +[4]: https://taskboard.matthewross.me/docs/ From c621b80f44d7288f94ba6f8f73ae305d34a72cbd Mon Sep 17 00:00:00 2001 From: MjSeven Date: Mon, 28 Jan 2019 19:31:26 +0800 Subject: [PATCH 055/164] Translating --- ...tting started with Isotope, an open source webmail client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md b/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md index e4a24a28a8..71307d1550 100644 --- a/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md +++ b/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ec3bd5b5881f5a08f1deebe8bc2108663f7e5141 Mon Sep 17 00:00:00 2001 From: jrg Date: Mon, 28 Jan 2019 20:36:13 +0800 Subject: [PATCH 056/164] Delete 20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md --- ...n a Raspberry Pi 3B- into a PriTunl VPN.md | 113 ------------------ 1 file changed, 113 deletions(-) delete mode 100644 sources/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md diff --git a/sources/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md b/sources/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md deleted file mode 100644 index 3d6d94cabf..0000000000 --- a/sources/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (jrglinux) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Turn a Raspberry Pi 3B+ into a PriTunl VPN) -[#]: via: (https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi) -[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) - -Turn a Raspberry Pi 3B+ into a PriTunl VPN -====== -PriTunl is a VPN solution for small businesses and individuals who want private access to their network. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2) - -[PriTunl][1] is a fantastic VPN terminator solution that's perfect for small businesses and individuals who want a quick and simple way to access their network privately. It's open source, and the basic free version is more than enough to get you started and cover most simple use cases. There is also a paid enterprise version with advanced features like Active Directory integration. - -### Special considerations on Raspberry Pi 3B+ - -PriTunl is generally simple to install, but this project—turning a Raspberry Pi 3B+ into a PriTunl VPN appliance—adds some complexity. For one thing, PriTunl is supplied only as AMD64 and i386 binaries, but the 3B+ uses ARM architecture. This means you must compile your own binaries from source. That's nothing to be afraid of; it can be as simple as copying and pasting a few commands and watching the terminal for a short while. - -Another problem: PriTunl seems to require 64-bit architecture. I found this out when I got errors when I tried to compile PriTunl on my Raspberry Pi's 32-bit operating system. Fortunately, Ubuntu's beta version of 18.04 for ARM64 boots on the Raspberry Pi 3B+. - -Also, the Raspberry Pi 3B+ uses a different bootloader from other Raspberry Pi models. This required a complicated set of steps to install and update the necessary files to get a Raspberry Pi 3B+ to boot. - -### Installing PriTunl - -You can overcome these problems by installing a 64-bit operating system on the Raspberry Pi 3B+ before installing PriTunl. I'll assume you have basic knowledge of how to get around the Linux command line and a Raspberry Pi. - -Start by opening a terminal and downloading the Ubuntu 18.04 ARM64 beta release by entering: - -``` -$ wget http://cdimage.ubuntu.com/releases/18.04/beta/ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img.xz -``` - -Unpack the download: - -``` -$ xz -d ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.xz -``` - -Insert the SD card you'll use with your Raspberry Pi into your desktop or laptop computer. Your computer will assign the SD card a drive letter—something like **/dev/sda** or **/dev/sdb**. Enter the **dmesg** command and examine the last lines of the output to find out the card's drive assignment. - -**Be VERY CAREFUL with the next step! I can't stress that enough; if you get the drive assignment wrong, you could destroy your system.** - -Write the image to your SD card with the following command, changing **< DRIVE>** to your SD card's drive assignment (obtained in the previous step): - -``` -$ dd if=ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img of= bs=8M -``` - -After it finishes, insert the SD card into your Pi and power it up. Make sure the Pi is connected to your network, then log in with username/password combination ubuntu/ubuntu. - -Enter the following commands on your Pi to install a few things to prepare to compile PriTunl: - -``` -$ sudo apt-get -y install build-essential git bzr python python-dev python-pip net-tools openvpn bridge-utils psmisc golang-go libffi-dev mongodb -``` - -There are a few changes from the standard PriTunl source [installation instructions on GitHub][2]. Make sure you are logged into your Pi and **sudo** to root: - -``` -$ sudo su - -``` - -This should leave you in root's home directory. To install PriTunl version 1.29.1914.98, enter (per GitHub): - -``` -export VERSION=1.29.1914.98 -tee -a ~/.bashrc << EOF -export GOPATH=\$HOME/go -export PATH=/usr/local/go/bin:\$PATH -EOF -source ~/.bashrc -mkdir pritunl && cd pritunl -go get -u github.com/pritunl/pritunl-dns -go get -u github.com/pritunl/pritunl-web -sudo ln -s ~/go/bin/pritunl-dns /usr/bin/pritunl-dns -sudo ln -s ~/go/bin/pritunl-web /usr/bin/pritunl-web -wget https://github.com/pritunl/pritunl/archive/$VERSION.tar.gz -tar -xf $VERSION.tar.gz -cd pritunl-$VERSION -python2 setup.py build -pip install -r requirements.txt -python2 setup.py install --prefix=/usr/local -``` - -Now the MongoDB and PriTunl systemd units should be ready to start up. Assuming you're still logged in as root, enter: - -``` -systemctl daemon-reload -systemctl start mongodb pritunl -systemctl enable mongodb pritunl -``` - -That's it! You're ready to hit PriTunl's browser user interface and configure it by following PriTunl's [installation and configuration instructions][3] on its website. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi - -作者:[Stephen Bancroft][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/stevereaver -[b]: https://github.com/lujun9972 -[1]: https://pritunl.com/ -[2]: https://github.com/pritunl/pritunl -[3]: https://docs.pritunl.com/docs/configuration-5 From 18d944a254382dd664069f1c2f83a5b3b6781fd6 Mon Sep 17 00:00:00 2001 From: jrg Date: Mon, 28 Jan 2019 20:36:58 +0800 Subject: [PATCH 057/164] Create 20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成 --- ...n a Raspberry Pi 3B- into a PriTunl VPN.md | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md diff --git a/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md b/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md new file mode 100644 index 0000000000..a610a2cfbd --- /dev/null +++ b/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md @@ -0,0 +1,114 @@ +[#]: collector: (lujun9972) +[#]: translator: (jrglinux) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Turn a Raspberry Pi 3B+ into a PriTunl VPN) +[#]: via: (https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi) +[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) + +将树梅派3B+变为 PriTunl VPN +====== +PriTunl 是一种 VPN 解决方案,适用于希望私密的访问其网络的小型企业和个人。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2) + +[PriTunl][1] 是一款出色的 VPN 终端解决方案,非常适合希望以简单快捷的方式私密的访问网络的小型企业和个人。 它是开源的,基本的免费版本涵盖最通用的简单的实例,足以让你快速入门。 也有集成 Active Directory 等高级功能的付费企业版 + +### 有关树梅派3B+的特别注意事项 + +PriTunl 的安装通常也很简单,但要在树梅派3B+上安装 PriTunl 有点小复杂。比如,PriTunl 只提供了 AMD64 和 i386 架构的二进制文件,但树梅派3B+是 ARM 架构的,这意味着需要从源码自行编译可用于树梅派3B+的 PriTunl 可执行文件。不过,无需担心,编译过程很简单,只需花一点时间执行几行命令即可。 + +另一个问题:PriTunl 好像必须要是64位处理器架构,当我在32位操作系统上尝试编译的时候报错了。但幸运的是,用于 ARM64 架构的 Ubuntu 18.04 测试版本可以安装在树梅派3B+上。 + +同样,树梅派3B+需要和其他树梅派不同的引导程序。需要一组小复杂的命令来安装更新树梅派3B+上必要的组件。 + + +### 安装 PriTunl + +你可以先在树梅派3B+上安装64位的操作系统来避免下面这些问题。此处需要一些必要的基础知识如在树梅派上执行命令行。 + +打开终端,用如下命令下载 Ubuntu 18.04 用于 ARM64 架构的测试版: + +``` +$ wget http://cdimage.ubuntu.com/releases/18.04/beta/ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img.xz +``` + +将下载的固件解压: + +``` +$ xz -d ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.xz +``` + +将准备好的 SD 卡插入电脑读卡槽,电脑会为 SD 卡分配一个驱动分配器号,例如 **/dev/sda** 或者 **/dev/sdb**。 输入命令 **dmesg** 然后观察屏幕上的最后几行找到 SD 卡的驱动分配器。 + +**下一步小心操作,如果搞错了驱动分配器号,可能会破坏你的系统** + +用如下命令往 SD 卡中写入数据,将其中的 **** 替换成你的 SD 驱动器号。 + +``` +$ dd if=ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img of= bs=8M +``` + +完成上一步之后,将 SD 卡插入树梅派3B+,并启动它。确保树梅派3B+是连网的,然后登陆系统,用户名/密码:ubuntu/ubuntu。 + +在树梅派上输入以下命令以安装一些准备编译PriTunl的东西: + +``` +$ sudo apt-get -y install build-essential git bzr python python-dev python-pip net-tools openvpn bridge-utils psmisc golang-go libffi-dev mongodb +``` + +和 PriTunl 标准源码上的 [安装说明][2] 有一点不一样。确保已经登录进树梅派然后切换到管理员账户: + +``` +$ sudo su - +``` + +现在你应该在管理员账户的目录下,按如下命令来安装 PriTunl 1.29.1914.98 版本: + +``` +export VERSION=1.29.1914.98 +tee -a ~/.bashrc << EOF +export GOPATH=\$HOME/go +export PATH=/usr/local/go/bin:\$PATH +EOF +source ~/.bashrc +mkdir pritunl && cd pritunl +go get -u github.com/pritunl/pritunl-dns +go get -u github.com/pritunl/pritunl-web +sudo ln -s ~/go/bin/pritunl-dns /usr/bin/pritunl-dns +sudo ln -s ~/go/bin/pritunl-web /usr/bin/pritunl-web +wget https://github.com/pritunl/pritunl/archive/$VERSION.tar.gz +tar -xf $VERSION.tar.gz +cd pritunl-$VERSION +python2 setup.py build +pip install -r requirements.txt +python2 setup.py install --prefix=/usr/local +``` + +现在,不出意外的话应该可以启动 MongoDB 和 PriTunl 系统单元了。假如现在还是以管理员账户登录的话,输入: + +``` +systemctl daemon-reload +systemctl start mongodb pritunl +systemctl enable mongodb pritunl +``` + +大功告成!你现在可以登录 PriTunl 的用户界面并按照官网上的 [安装和配置手册][3] 来配置它了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi + +作者:[Stephen Bancroft][a] +选题:[lujun9972][b] +译者:[jrg](https://github.com/jrglinux) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/stevereaver +[b]: https://github.com/lujun9972 +[1]: https://pritunl.com/ +[2]: https://github.com/pritunl/pritunl +[3]: https://docs.pritunl.com/docs/configuration-5 From e836ea817279f26be68718192c8d814fa212254f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 28 Jan 2019 22:35:22 +0800 Subject: [PATCH 058/164] PRF:20150717 The History of Hello World.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zzzzzzmj 恭喜你完成了第一篇翻译! --- .../20150717 The History of Hello World.md | 61 +++++++++---------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/translated/tech/20150717 The History of Hello World.md b/translated/tech/20150717 The History of Hello World.md index 514f24d109..d896e03f16 100644 --- a/translated/tech/20150717 The History of Hello World.md +++ b/translated/tech/20150717 The History of Hello World.md @@ -1,53 +1,52 @@ [#]: collector: "lujun9972" [#]: translator: "zzzzzzmj" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "The History of Hello World" [#]: via: "https://www.thesoftwareguild.com/blog/the-history-of-hello-world/" [#]: author: "thussong https://www.thesoftwareguild.com/blog/author/thussong/" +Hello World 的由来 +========= +资深软件开发人员都知道 [Hello World][2] 程序,这是一个能在设备显示器上输出某种变体的 “Hello, World!” 的程序,是学习编程的第一步。在这个编程中只涉及到一些最基本语法的程序,可以用大多数编程语言了来编写。事实上,路易斯安纳理工学院计算机协会(ACM)在最近统计[发现][3]这个程序至少有 204 个版本。 -# Hello World 的由来 +传统意义上,Hello World 程序是用于说明编码过程是如何工作的,以及确保编程语言或系统能正常运行。它们经常是新手程序员学习的第一个程序,因为即使是经验很少或者没有经验的人也能轻松正确的执行 Hello World。 -资深软件开发人员都知道[Hello world](2)程序,一个能被输出多种"Hello, World!"的程序,是学习编程的第一步。这个编程中只涉及到一些最基本语法的程序,可以被大多数语言输出在显示器上。事实上,路易斯安纳理工学院计算机协会(ACM)在最近统计[发现](3)这个项目至少有204个版本。 +首先,Hello World 简单,这就是为什么它经常被用做程序执行成功的晴雨表。如果 Hello World 在该框架中无法有效执行,那么其它更复杂的程序中也可能会失败。正如 [Win-Vector][4] 的一位专家所说,Hello World 实际上是一个对抗性程序。“该作者还说道,‘你的计算机系统能不能工作并不是一目了然,除非我能看到它至少能打印一行文字,否则我不会在上面浪费太多时间。’” Win-Vector 博主 John Mount 说。 -传统意义上,Hello World程序是用于说明编码过程是如何工作的,以及确保语言或系统能正常运行。它们经常是新手程序员学习的第一个程序,因为即使是经验很少或者没有经验的人也能轻松正确的执行Hello World。 - -首先,Hello World 简单,这就是为什么它经常被用做程序执行成功的晴雨表。如果Hello World在框架中无法有效执行,那么在其他更复杂的程序中也可能会失败。正如[Win-Vector](4)的一位专家所说,"Hello World实际上是一个对抗性程序"。该作者还说道,"你的计算机系统没有工作并不起眼,所有我们不会花很多时间在上面,不过我要看到它至少能打印一行文字"。 - -但是 这个两词短语在计算机科学领域有着重大的影响。以Hello World为基础,新手程序员可以轻松的去理解计算机科学原理,而拥有多年编码经验的程序员可以用它来学习编程语言的工作原理,特别是在结构与语言方面。这样的一个小程序,在任何难度和几乎所有的语言的应用程序中都有着悠久的历史。 +但是这个两词短语在计算机科学领域有着重大的影响。以 Hello World 为基础,新手程序员可以轻松的理解计算机科学原理或元素,而拥有多年编码经验的程序员可以用它来学习编程语言的工作原理,特别是在结构与语法方面。这样的一个小程序,在任何难度的应用程序和几乎所有语言中都有着悠久的历史。 ### 用途 -上文中一句话概括Hello World程序的主要用途:这是新手程序员熟悉新语言的一种方式。然而,这些程序不仅仅是对编码世界的介绍。例如,Hello World 可以作为测试,以确保语言的组件(编译器,开发和运行环境)安装正确。因为配置完整的编程工具链的过程复杂而漫长,所以像Hello World这样简单的程序通常用作新工具的首次运行测试。 +以上概括了 Hello World 程序的主要用途:这是新手程序员熟悉新语言的一种方式。然而,这些程序不仅仅是对编码世界的介绍。例如,Hello World 可以作为测试,以确保语言的组件(编译器、开发和运行环境)安装正确。因为配置完整的编程工具链的过程复杂而漫长,所以像 Hello World 这样简单的程序通常用作新工具链的首次运行测试。 -根据Cunningham & Cunningham (C2)的编程顾问所说, 黑客经常使用Hello World程序, 来证明猜想,因为任何代码都可以通过漏洞执行,而系统设计人员并不允许执行代码。事实上,它是在设备上使用自制内容或者“home brew”的第一步, 当[有经验的编码人员](5)正在配置环境或在学习新事物时,他们会Hello World 来验证动作是否正确。 +根据 Cunningham & Cunningham(C2)的编程顾问所说,在系统设计人员并不预期可以执行代码的地方,黑客经常使用 Hello World 程序作为一个可以通过漏洞执行任意代码的概念验证(POC)。事实上,它是在设备上使用自制内容或者“自酿”的第一步,当[有经验的编码人员][5]正在配置环境或在学习新事物时,他们会通过 Hello World 来验证其行为是否正确。 -它也是作为调试的一部分,允许程序员在程序运行时检查他么编辑修改了的地方是否正确,然后重新加载。 +它也作为调试过程的一部分,允许程序员检查他们是否正确地编辑了可在运行时修改的程序并重新加载。 -Hello World的一个更常用的用途是作为基础的比较。根据C2的wiki所讲,程序员可以比较语言生成的可执行文件的大小,以及程序背后必须存在多少支持基础结构才能执行。 +Hello World 的一个更常用的用途是作为基础比较。根据 C2 的 wiki 所讲,程序员可以“比较语言生成的可执行文件的大小,以及程序背后必须存在多少支持的基础设施才能执行。” ### 开端 -虽然Hello World 的起源还有些不太明了,不过人们普遍认为它是作为测试用语,最早出现在Brian Kernigham 在1972年发布的B语言教程简介中。在此文中,该程序的第一个已知版本用于说明外部变量。因为教程中的前一个例子在终端上打印了“hi!”,而需要更多字符常量来表达相对复杂的“hello,world!”,是学习过程的下一步。 +虽然 Hello World 的起源还有些不太明了,不过人们普遍认为它作为测试用语,最早出现在 Brian Kernigham 在 1972 年发布的《B 语言简介教程A Tutorial Introduction to the Language B》中。在此文中,该程序的第一个已知版本用于说明外部变量。因为该教程中的前一个例子在终端上打印了 “hi!”,而需要更多的字符常量来表达相对复杂的 “hello,world!”,这是学习过程的下一步。 -在那以后,它还被用于1974年的贝尔实验室备忘录,以及1987年的C语言程序设计。这两篇著名的文章是让Hello World闻名于世的主要原因。在书中的一个例子(第一个也是最著名的例子)打印了没有大写字母和感叹号的“hello,world”,此时的Hello World几乎只是用于说明语言的一些功能,而不是测试系统是否正常运行。 +在那以后,它还被用于 1974 年的贝尔实验室备忘录,以及 1987 年的《C 语言程序设计The C Programming Language》。这两篇著名的文字是让 Hello World 闻名于世的主要原因。在书中的一个例子(第一个,也是最著名的例子)打印了没有大写字母和感叹号的 “hello,world”。此时的 Hello World 几乎只是用于说明语言的一些功能,而不是测试系统是否正常运行。 -在Kernigham的关于B语言和C语言的开创性文章之前,没有真正意义上的第一个程序,甚至直到1974年,它也没被广泛使用。著名的BASIC教程“My Computer Likes Me,When I Speak BASIC”,从一个写一行文本的简单程序开始,不过那句话是“MY HUMAN UNDERSTANDS ME”,跟如今程序员侃侃而谈的双词问候语差的有点远。不过,当Hello World被发明后,它就迅速传播,并在20世纪70年代后从所周知。直到今天它也依然受欢迎。 +在 Kernigham 的关于 B 语言和 C 语言的开创性文章之前,没有真正意义上的第一个程序,甚至直到 1974 年,它也没被广泛使用。著名的 BASIC 教程 “我的电脑喜欢我用 BASIC 跟它讲话My Computer Likes Me,When I Speak BASIC”,从一个写一行文本的简单程序开始,不过那句话是 “MY HUMAN UNDERSTANDS ME”,跟如今程序员侃侃而谈的这个双词问候语差的有点远。不过,当 Hello World 被发明后,它就迅速传播,并在 20 世纪 70 年代后变成了众所周知。直到今天它也依然受欢迎。 -### 一个声明, 多种语言 +### 一个声明,多种语言 -以下是目前正在被使用的一些流行的编程语言中的Hello World 代码 +以下是目前正在被使用的一些流行的编程语言中的 Hello World 代码。 #### Java ``` class HelloWorld { -public static void main(String[] args) { -System.out.println("Hello, world!"); -} + public static void main(String[] args) { + System.out.println("Hello, world!"); + } } ``` @@ -57,10 +56,10 @@ System.out.println("Hello, world!"); using System; class Program { -public static void Main(string[] args) -{ -Console.WriteLine("Hello, world!"); -} + public static void Main(string[] args) + { + Console.WriteLine("Hello, world!"); + } } ``` @@ -80,7 +79,7 @@ puts "Hello, world!" ``` object HelloWorld extends App { -println("Hello, world!") + println("Hello, world!") } ``` @@ -115,17 +114,15 @@ main = putStrLn "Hello, world!" package main import "fmt" func main() { -fmt.Println("Hello, world!") + fmt.Println("Hello, world!") } ``` +### 如今的 Hello world:各种形式下的标准实践 +在现在的编程语言中,Hello World 有着不同的复杂程度。例如,Go 语言中引入一个多语言版的 Hello World 程序,XL 则会提供一个具有图形、可旋转的 3D 版本。一些编程语言,像 Ruby、Python,仅仅需要一个语句去打印“Hello World”,但是低级汇编语言则需要几个命令才能做到这样。现在的编程语言还引入对标点符号和大小写的变化,包括是否有逗号或者感叹号,以及两个词的大写形式。举个例子,当系统只支持大写字母,会呈现像“HELLO WORLD”的短语。值得纪念的第一个 Malbolge 程序打印出了“HEllO WORld”(LCTT 译注:Malbolge 是最难的编程语言之一。事实上,在它诞生后,花了 2 年时间才完成第一个 Malbolge 程序)。它的变体跨越了原本的字面意思。像 Lisp、Haskell 这样函数语言,用阶乘程序替代了 Hello World,从而注重递归技术。这与原来的示例不同,后者更强调 I/O 以及产生的副作用。 -### 如今的 Hello world: 各种形式下的标准实践 - -在现在的编程语言中,Hello world有着不同的复杂程度。例如,Go语言中引入一个多语言的Hello World程序,XL则会提供一个具有图形、可旋转的3D版本。一些编程语言,像Ruby,Python,仅仅需要一个声明去打印"Hello World",但是低级汇编语言则需要几个命令才能做到这样。现在的编程语言还引入对标点符号的支持,包括逗号或者感叹号是否存在,以及两个词的大写。举个例子,当系统只支持大写字母,会呈现像"HELLO WORLD"的短语。第一个不平凡的Malbolge程序打印出了"HEllO WORld",跨域了原本的字面意思。功能语言像Lisp、Haskell,阶乘程序替代了Hello World,从而注重递归技术。这与原来的示例不同,后者更强调I/O以及产生的副作用。 - -随着现在的编程语言越来越复杂,Hello World 比以往显得更加重要。同样作为测试和教学工具,它已经成为程序员测试配置的编程环境的标准方法。没有人能确切说出为什么Hello World能在快速创新著称的行业中经受住时间的考验,但是它又确实留下来了。 +随着现在的编程语言越来越复杂,Hello World 比以往显得更加重要。作为测试和教学工具,它已经成为程序员测试配置的编程环境的标准方法。没有人能确切说出为什么 Hello World 能在快速创新著称的行业中经受住时间的考验,但是它又确实留下来了。 -------------------------------------------------------------------------------- @@ -134,7 +131,7 @@ via: https://www.thesoftwareguild.com/blog/the-history-of-hello-world/ 作者:[thussong][a] 选题:[lujun9972][b] 译者:[zzzzzzmj](https://github.com/zzzzzzmj) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8c3942968d69944577f72022941bee553c1fdb08 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 28 Jan 2019 22:36:41 +0800 Subject: [PATCH 059/164] PUB:20150717 The History of Hello World.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @zzzzzzmj 本文首发地址: https://linux.cn/article-10485-1.html 您的 LCTT 专页地址: https://linux.cn/lctt/zzzzzzmj 请注册领取 LCCN: https://lctt.linux.cn/ --- .../tech => published}/20150717 The History of Hello World.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20150717 The History of Hello World.md (99%) diff --git a/translated/tech/20150717 The History of Hello World.md b/published/20150717 The History of Hello World.md similarity index 99% rename from translated/tech/20150717 The History of Hello World.md rename to published/20150717 The History of Hello World.md index d896e03f16..de2b3bb551 100644 --- a/translated/tech/20150717 The History of Hello World.md +++ b/published/20150717 The History of Hello World.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "zzzzzzmj" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-10485-1.html" [#]: subject: "The History of Hello World" [#]: via: "https://www.thesoftwareguild.com/blog/the-history-of-hello-world/" [#]: author: "thussong https://www.thesoftwareguild.com/blog/author/thussong/" From eed786ab1d8b93a4a0f3c55ff2f9744e75df160f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 28 Jan 2019 23:12:34 +0800 Subject: [PATCH 060/164] PRF:20181203 How to bring good fortune to your Linux terminal.md @MjSeven --- ...ing good fortune to your Linux terminal.md | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/translated/tech/20181203 How to bring good fortune to your Linux terminal.md b/translated/tech/20181203 How to bring good fortune to your Linux terminal.md index 19d703afab..97def132e7 100644 --- a/translated/tech/20181203 How to bring good fortune to your Linux terminal.md +++ b/translated/tech/20181203 How to bring good fortune to your Linux terminal.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: subject: (How to bring good fortune to your Linux terminal) [#]: via: (https://opensource.com/article/18/12/linux-toy-fortune) @@ -9,20 +9,21 @@ 如何为你的 Linux 终端带来好运 ====== -使用 fortune 实用程序将引号和俏皮话带到命令行。 +> 使用 fortune 实用程序将名言和俏皮话带到命令行。 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-fortune.png?itok=5PVVZVer) -这是 12 月,如果你还没有找到一款能激发你灵感的[科技降临节日历][1],那么,也许这个系列可以。从现在到 24 日,每天我们都会为你带来一个不同的 Linux 命令行玩具。你可能会问,什么是命令行玩具?它可能是一个游戏或任何简单的娱乐,为你的终端带来一点点快乐。 +这是 12 月,如果你还没有找到一款能激发你灵感的[科技降临节日历][1],那么,也许这个系列可以。从现在到 24 日,每天我们都会为你带来一个不同的 Linux 命令行玩具。你可能会问,什么是命令行玩具?它可能是一个游戏或任何简单的娱乐程序,为你的终端带来一点点快乐。 你可能之前已经看过其中的一些,我们希望你也能发现一些新的东西。不管怎样,我们都希望你在关注时保有乐趣。 -今天的玩具是 **fortune**,它很古老。它的版本可以追溯到 1980 年,当时它包含在 Unix 中。我在 Fedora 中安装的版本是在 BSD 许可下提供的,我可以使用以下命令获取它。 +今天的玩具是 `fortune`,它很古老。它的版本可以追溯到 1980 年,当时它包含在 Unix 中。我在 Fedora 中安装的版本是在 BSD 许可下提供的,我可以使用以下命令获取它。(LCTT 译注:fortune 这个命令得名于 fortune cookies,是流行于西方的中餐馆的一种脆饼干,里面包含格言、幸运数字等。) + ``` $ sudo dnf install fortune-mod -y ``` -你的发行版可能会有所不同。在某些情况下,你可能需要将 fortunes 独立于 **fortune** 本身安装(尝试在你的包管理器中搜索 "fortunes")。你还可以在 [GitHub][2] 上查看它的源代码,然后,只需运行 **fortune** 即可获得好运。 +你的发行版可能会有所不同。在某些情况下,你可能需要在 `fortune` 命令之外单独安装那些“幸运饼干”(尝试在你的包管理器中搜索 “fortunes”)。你还可以在 [GitHub][2] 上查看它的源代码,然后,只需运行 `fortune` 即可获得好运。 ``` $ fortune @@ -30,11 +31,11 @@ $ fortune -- Ford Prefect, _Hitchhiker's Guide to the Galaxy_ ``` -那么,你为什么会在终端上需要 fortune 呢?当然是为了好玩啦。也许你想将它们添加到系统上的每天消息中? +那么,你为什么会在终端上需要 `fortune` 呢?当然是为了好玩啦。也许你想将它们添加到系统上的每天消息(motd)中? -就我个人而言,当我使用终端来解析文本时,我喜欢使用 **fortune** 命令作为一段内置的虚拟数据,特别是使用[正则表达式][3]时,我想要一些简单的东西来尝试一下。 +就我个人而言,当我使用终端来解析文本时,我喜欢使用 `fortune` 命令作为一段内置的虚拟数据,特别是使用[正则表达式][3]时,我想要一些简单的东西来尝试一下。 -例如,假设我使用 **tr** 命令来测试转换,用数字 3 替换字母 e。 +例如,假设我使用 `tr` 命令来测试转换,用数字 3 替换字母 e。 ``` $ fortune | tr 'eE' '3' @@ -47,19 +48,20 @@ th3m all th3 sam3 nam3. Som3 pass3ng3rs actually r3ach th3ir d3stinations. All pass3ng3rs b3li3v3 th3y got th3r3. ``` -那么 fortunes 到底为你的发行版带来了什么呢?看看你的 **/usr/share/games/fortune** 目录,找到它们。以下我最喜欢的几个。 +那么你的发行版带来了什么幸运饼干呢?看看你的 `/usr/share/games/fortune` 目录,找到它们。以下我最喜欢的几个。 + ``` Never laugh at live dragons.                 -- Bilbo Baggins [J.R.R. Tolkien, "The Hobbit"] I dunno, I dream in Perl sometimes... -             -- Larry Wall in  <8538@jpl-devvax.JPL.NASA.GOV> +             -- Larry Wall in  <8538@jpl-devvax.JPL.NASA.GOV> I have an existential map.  It has "You are here" written all over it.                 -- Steven Wright ``` -想要了解更多关于 **fortune**?当然,你可以经常查看 man 页来了解更多选项,或者在[维基百科][4]上阅读更多关于此命令的历史信息。 +关于 `fortune` 想要了解更多?当然,你可以经常查看 man 页来了解更多选项,或者在[维基百科][4]上阅读更多关于此命令的历史信息。 你有特别喜欢的命令行小玩具需要我介绍的吗?这个系列要介绍的小玩具大部分已经有了落实,但还预留了几个空位置。请在评论区留言,我会查看的。如果还有空位置,我会考虑介绍它的。如果没有,但如果我得到了一些很好的意见,我会在最后做一些有价值的提及。 @@ -73,7 +75,7 @@ via: https://opensource.com/article/18/12/linux-toy-fortune 作者:[Jason Baker][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 37ed877a1ca89e11fed90ce48c08cc46f66c4cbd Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 28 Jan 2019 23:13:16 +0800 Subject: [PATCH 061/164] PUB:20181203 How to bring good fortune to your Linux terminal.md @MjSeven https://linux.cn/article-10486-1.html --- ...181203 How to bring good fortune to your Linux terminal.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181203 How to bring good fortune to your Linux terminal.md (98%) diff --git a/translated/tech/20181203 How to bring good fortune to your Linux terminal.md b/published/20181203 How to bring good fortune to your Linux terminal.md similarity index 98% rename from translated/tech/20181203 How to bring good fortune to your Linux terminal.md rename to published/20181203 How to bring good fortune to your Linux terminal.md index 97def132e7..816ead368e 100644 --- a/translated/tech/20181203 How to bring good fortune to your Linux terminal.md +++ b/published/20181203 How to bring good fortune to your Linux terminal.md @@ -1,11 +1,11 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) +[#]: publisher: (wxy) [#]: subject: (How to bring good fortune to your Linux terminal) [#]: via: (https://opensource.com/article/18/12/linux-toy-fortune) [#]: author: (Jason Baker https://opensource.com/users/jason-baker) -[#]: url: ( ) +[#]: url: (https://linux.cn/article-10486-1.html) 如何为你的 Linux 终端带来好运 ====== From 590a7c58a515abac030ff061af7486cd0ed3d7d6 Mon Sep 17 00:00:00 2001 From: suncle Date: Mon, 28 Jan 2019 23:32:54 +0800 Subject: [PATCH 062/164] translating by Flowsnow --- ...4 An introduction to the Pyramid web framework for Python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20180514 An introduction to the Pyramid web framework for Python.md b/sources/tech/20180514 An introduction to the Pyramid web framework for Python.md index a16e604774..03a6fa6494 100644 --- a/sources/tech/20180514 An introduction to the Pyramid web framework for Python.md +++ b/sources/tech/20180514 An introduction to the Pyramid web framework for Python.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Flowsnow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: subject: (An introduction to the Pyramid web framework for Python) From f957ca204b39a0aeb249201086fbec0da44374e4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 28 Jan 2019 23:34:52 +0800 Subject: [PATCH 063/164] PRF:20150717 The History of Hello World.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免转义 --- published/20150717 The History of Hello World.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20150717 The History of Hello World.md b/published/20150717 The History of Hello World.md index de2b3bb551..5d2af398dd 100644 --- a/published/20150717 The History of Hello World.md +++ b/published/20150717 The History of Hello World.md @@ -50,7 +50,7 @@ class HelloWorld { } ``` -#### C# +#### C# ``` using System; From 8d5472c48f5cc4b8b5cd0638795ae41ccb5fb6d0 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 29 Jan 2019 00:32:37 +0800 Subject: [PATCH 064/164] PRF:20180809 Perform robust unit tests with PyHamcrest.md @MjSeven --- ...rform robust unit tests with PyHamcrest.md | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/translated/tech/20180809 Perform robust unit tests with PyHamcrest.md b/translated/tech/20180809 Perform robust unit tests with PyHamcrest.md index 5d44d86bce..4911aec938 100644 --- a/translated/tech/20180809 Perform robust unit tests with PyHamcrest.md +++ b/translated/tech/20180809 Perform robust unit tests with PyHamcrest.md @@ -1,28 +1,26 @@ -Perform robust unit tests with PyHamcrest 使用 PyHamcrest 执行健壮的单元测试 ====== +> 使用此框架编写断言,提高开发测试的准确性。 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/web_browser_desktop_devlopment_design_system_computer.jpg?itok=pfqRrJgh) 在[测试金字塔][1]的底部是单元测试。单元测试每次只测试一个代码单元,通常是一个函数或方法。 -通常,设计单个单元测试是为了测试通过函数或特定分支选择的特定流,这使得失败的单元测试和导致失败的 bug 之间的映射变得容易。 +通常,设计单个单元测试是为了测试通过一个函数或特定分支的特定执行流程,这使得将失败的单元测试和导致失败的 bug 对应起来变得容易。 -理想情况下,单元测试使用很少或不使用外部资源,从而隔离它们并使它们更快。 +理想情况下,单元测试很少使用或不使用外部资源,从而隔离它们并使它们更快。 -_好_ 测试通过尽早发现 bug 并加快测试速度来提高开发人员的工作效率。_坏_ 测试降低了开发人员的工作效率。 +单元测试套件通过在开发过程的早期发现问题来帮助维护高质量的产品。有效的单元测试可以在代码离开开发人员机器之前捕获 bug,或者至少可以在特定分支上的持续集成环境中捕获 bug。这标志着好的和坏的单元测试之间的区别:*好的*测试通过尽早捕获 bug 并使测试更快来提高开发人员的生产力。*坏的*测试降低了开发人员的工作效率。 -单元测试套件通过在开发过程的早期发现问题来帮助维护高质量的产品。有效的单元测试在代码离开开发人员机器之前捕获 bug,或者至少在特定分支上的持续集成环境中捕获 bug。这标志着好的和坏的单元测试之间的区别:好的测试通过尽早捕获 bug 并使测试更快来提高开发人员的生产力。坏的测试降低了开发人员的工作效率。 - -当测试 _附带的特性_ 时,生产率通常会降低。当代码更改时测试失败,即时它仍然是正确的。发生这种情况是因为输出不同,但在某种程度上它不是函数契约的一部分。 +当测试*附带的特性*时,生产率通常会降低。当代码更改时测试会失败,即使它仍然是正确的。发生这种情况是因为输出的不同,但在某种程度上是因为它不是函数契约function's contract的一部分。 因此,一个好的单元测试可以帮助执行函数所提交的契约。 -如果单元测试中断,那意味着契约被违反了,应该明确修改(通过更改文档和测试),或者被修复(通过修复代码并保持测试不变)。 +如果单元测试中断,那意味着该契约被违反了,应该(通过更改文档和测试)明确修改,或者(通过修复代码并保持测试不变)来修复。 虽然将测试限制为只执行公共契约是一项需要学习的复杂技能,但有一些工具可以提供帮助。 -其中一个工具是 [Hamcrest][2],一个用于编写断言的框架。最初是为基于 Java 的单元测试而发明的,它现在支持多种语言,包括 [Python][3]。 +其中一个工具是 [Hamcrest][2],这是一个用于编写断言的框架。最初是为基于 Java 的单元测试而发明的,但它现在支持多种语言,包括 [Python][3]。 Hamcrest 旨在使测试断言更容易编写和更精确。 @@ -36,7 +34,8 @@ def test_add():     assert_that(add(2, 2), equal_to(4))   ``` -这是一个用于简单功能的断言。如果我们想要断言更复杂的怎么办? +这是一个用于简单函数的断言。如果我们想要断言更复杂的函数怎么办? + ``` def test_set_removal():     my_set = {1, 2, 3, 4} @@ -45,13 +44,14 @@ def test_set_removal():     assert_that(my_set, is_not(has_item(3))) ``` -注意,我们可以简单地断言结果的顺序为 `1`, `2` 和 `4`,因为集合不保证顺序。 +注意,我们可以简单地断言其结果是任何顺序的 `1`、`2` 和 `4`,因为集合不保证顺序。 -我们也可以很容易用 `is_not` 来否定断言。这有助于我们编写 _精确的断言_,使我们能够把自己限制在执行职能的公共契约方面。 +我们也可以很容易用 `is_not` 来否定断言。这有助于我们编写*精确的断言*,使我们能够把自己限制在执行函数的公共契约方面。 -然而,有时候,内置功能都不是我们 _真正_ 需要的。在这些情况下,Hamcrest 允许我们编写自己的匹配器。 +然而,有时候,内置的功能都不是我们*真正*需要的。在这些情况下,Hamcrest 允许我们编写自己的匹配器matchers。 想象一下以下功能: + ``` def scale_one(a, b):     scale = random.randint(0, 5) @@ -59,9 +59,10 @@ def scale_one(a, b):     return scale * pick ``` -我们可以自信地断言结果均匀地划分为至少一个输入。(to 校正:???什么意思) +我们可以自信地断言其结果均匀地分配到至少一个输入。 匹配器继承自 `hamcrest.core.base_matcher.BaseMatcher`,重写两个方法: + ``` class DivisibleBy(hamcrest.core.base_matcher.BaseMatcher):     def __init__(self, factor): @@ -76,12 +77,14 @@ class DivisibleBy(hamcrest.core.base_matcher.BaseMatcher): ``` 编写高质量的 `describe_to` 方法很重要,因为这是测试失败时显示的消息的一部分。 + ``` def divisible_by(num):     return DivisibleBy(num) ``` 按照惯例,我们将匹配器包装在一个函数中。有时这给了我们进一步处理输入的机会,但在这种情况下,我们不需要进一步处理。 + ``` def test_scale():     result = scale_one(3, 7) @@ -92,7 +95,8 @@ def test_scale(): 请注意,我们将 `divisible_by` 匹配器与内置的 `any_of` 匹配器结合起来,以确保我们只测试函数提交的内容。 -在编辑这篇文章时,我听到一个传言,“Hamcrest” 这个名字被认为是 “matches” 的字谜。人力资源管理... +在编辑这篇文章时,我听到一个传言,取 “Hamcrest” 这个名字是因为它是 “matches” 字母组成的字谜。嗯... + ``` >>> assert_that("matches", contains_inanyorder(*"hamcrest") Traceback (most recent call last): @@ -106,13 +110,14 @@ Expected: a sequence over ['h', 'a', 'm', 'c', 'r', 'e', 's', 't'] in any order       but: no item matches: 'r' in ['m', 'a', 't', 'c', 'h', 'e', 's'] ``` -经过进一步的研究,我找到了谣言的来源:它是 “matchers” 的字谜。 +经过进一步的研究,我找到了传言的来源:它是 “matchers” 字母组成的字谜。 + ``` >>> assert_that("matchers", contains_inanyorder(*"hamcrest")) >>> ``` -如果你还没有为你的 Python 代码编写单元测试,那么现在是开始的好时机。如果你正在为你的 Python 代码编写单元测试,那么使用 Hamcrest 将允许你使你的断言更加 _精确_,既不会比你想要测试的多也不会少。这将在修改代码时减少误报,并减少修改工作代码的测试所花费的时间。 +如果你还没有为你的 Python 代码编写单元测试,那么现在是开始的好时机。如果你正在为你的 Python 代码编写单元测试,那么使用 Hamcrest 将允许你使你的断言更加*精确*,既不会比你想要测试的多也不会少。这将在修改代码时减少误报,并减少修改工作代码的测试所花费的时间。 -------------------------------------------------------------------------------- @@ -121,8 +126,8 @@ via: https://opensource.com/article/18/8/robust-unit-tests-hamcrest 作者:[Moshe Zadka][a] 选题:[lujun9972](https://github.com/lujun9972) -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 927408d535bf785513e99b52397570f050b4afb0 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 29 Jan 2019 00:32:56 +0800 Subject: [PATCH 065/164] PUB:20180809 Perform robust unit tests with PyHamcrest.md @MjSeven https://linux.cn/article-10487-1.html --- .../20180809 Perform robust unit tests with PyHamcrest.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180809 Perform robust unit tests with PyHamcrest.md (100%) diff --git a/translated/tech/20180809 Perform robust unit tests with PyHamcrest.md b/published/20180809 Perform robust unit tests with PyHamcrest.md similarity index 100% rename from translated/tech/20180809 Perform robust unit tests with PyHamcrest.md rename to published/20180809 Perform robust unit tests with PyHamcrest.md From 0852a7f9c9a687f6407ee5337cb2164c247174f7 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 29 Jan 2019 08:51:45 +0800 Subject: [PATCH 066/164] translated --- ... How to open source your Python library.md | 114 ----------------- ... How to open source your Python library.md | 115 ++++++++++++++++++ 2 files changed, 115 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20181219 How to open source your Python library.md create mode 100644 translated/tech/20181219 How to open source your Python library.md diff --git a/sources/tech/20181219 How to open source your Python library.md b/sources/tech/20181219 How to open source your Python library.md deleted file mode 100644 index 79c25c9a00..0000000000 --- a/sources/tech/20181219 How to open source your Python library.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to open source your Python library) -[#]: via: (https://opensource.com/article/18/12/tips-open-sourcing-python-libraries) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -How to open source your Python library -====== -This 12-step checklist will ensure a successful launch. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx) - -You wrote a Python library. I'm sure it's amazing! Wouldn't it be neat if it was easy for people to use it? Here is a checklist of things to think about and concrete steps to take when open sourcing your Python library. - -### 1\. Source - -Put the code up on [GitHub][1], where most open source projects happen and where it is easiest for people to submit pull requests. - -### 2\. License - -Choose an open source license. A good, permissive default is the [MIT License][2]. If you have specific requirements, Creative Common's [Choose a License][3] can guide you through the alternatives. Most importantly, there are three rules to keep in mind when choosing a license: - - * Don't create your own license. - * Don't create your own license. - * Don't create your own license. - - - -### 3\. README - -Put a file called README.rst, formatted with ReStructured Text, at the top of your tree. - -GitHub will render ReStructured Text just as well as Markdown, and ReST plays better with Python's documentation ecosystem. - -### 4\. Tests - -Write tests. This is not useful just for you: it is useful for people who want to make patches that avoid breaking related functionality. - -Tests help collaborators collaborate. - -Usually, it is best if they are runnable with [**pytest**][4]. There are other test runners—but very little reason to use them. - -### 5\. Style - -Enforce style with a linter: PyLint, Flake8, or Black with **\--check**. Unless you use Black, make sure to specify configuration options in a file checked into source control. - -### 6\. API documentation - -Use docstrings to document modules, functions, classes, and methods. - -There are a few styles you can use. I prefer the [Google-style docstrings][5], but [ReST docstrings][6] are an option. - -Both Google-style and ReST docstrings can be processed by Sphinx to integrate API documentation with prose documentation. - -### 7\. Prose documentation - -Use [Sphinx][7]. (Read [our article on it][8].) A tutorial is useful, but it is also important to specify what this thing is, what it is good for, what it is bad for, and any special considerations. - -### 8\. Building - -Use **tox** or **nox** to automatically run your tests and linter and build the documentation. These tools support a "dependency matrix." These matrices tend to explode fast, but try to test against a reasonable sample, such as Python versions, versions of dependencies, and possibly optional dependencies you install. - -### 9\. Packaging - -Use [setuptools][9]. Write a **setup.py** and a **setup.cfg**. If you support both Python 2 and 3, specify universal wheels in the **setup.cfg**. - -One thing **tox** or **nox** should do is build a wheel and run tests against the installed wheel. - -Avoid C extensions. If you absolutely need them for performance or binding reasons, put them in a separate package. Properly packaging C extensions deserves its own post. There are a lot of gotchas! - -### 10\. Continuous integration - -### 11\. Versions - -Use a public continuous integration runner. [TravisCI][10] and [CircleCI][11] offer free tiers for open source projects. Configure GitHub or other repo to require passing checks before merging pull requests, and you'll never have to worry about telling people to fix their tests or their style in code reviews. - -Use either [SemVer][12] or [CalVer][13]. There are many tools to help manage versions: [incremental][14], [bumpversion][15], and [setuptools_scm][16] are all packages on PyPI that help manage versions for you. - -### 12\. Release - -Release by running **tox** or **nox** and using **twine** to upload the artifacts to PyPI. You can do a "test upload" by running [DevPI][17]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/12/tips-open-sourcing-python-libraries - -作者:[Moshe Zadka][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/moshez -[b]: https://github.com/lujun9972 -[1]: https://github.com/ -[2]: https://en.wikipedia.org/wiki/MIT_License -[3]: https://choosealicense.com/ -[4]: https://docs.pytest.org/en/latest/ -[5]: https://github.com/google/styleguide/blob/gh-pages/pyguide.md -[6]: https://www.python.org/dev/peps/pep-0287/ -[7]: http://www.sphinx-doc.org/en/master/ -[8]: https://opensource.com/article/18/11/building-custom-workflows-sphinx -[9]: https://pypi.org/project/setuptools/ -[10]: https://travis-ci.org/ -[11]: https://circleci.com/ -[12]: https://semver.org/ -[13]: https://calver.org/ -[14]: https://pypi.org/project/incremental/ -[15]: https://pypi.org/project/bumpversion/ -[16]: https://pypi.org/project/setuptools_scm/ -[17]: https://opensource.com/article/18/7/setting-devpi diff --git a/translated/tech/20181219 How to open source your Python library.md b/translated/tech/20181219 How to open source your Python library.md new file mode 100644 index 0000000000..7c4a2d3f25 --- /dev/null +++ b/translated/tech/20181219 How to open source your Python library.md @@ -0,0 +1,115 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to open source your Python library) +[#]: via: (https://opensource.com/article/18/12/tips-open-sourcing-python-libraries) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +如何开源你的 Python 库 +====== +这 12 个步骤能确保成功发布。 +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx) + +你写了一个 Python 库。我觉着这太棒了!如果让人们能够轻松使用它不是很优雅么?这有一个需要考虑的清单,以及在开源 Python 库时要采取的具体步骤。 + +### 1\. 源码 + +将代码放在 [GitHub][1] 上,这里有很多开源项目,并且人们很容易提交拉取请求。 + +### 2\. 许可证 + +选择一个开源许可证。默认的一个不错的,宽容的是 [MIT 许可][2]。如果你有特定要求,Creative Common 的[选择许可][3]可以指导你完成其他选择。最重要的是,在选择许可时要记住三条规则: + + + * 不要创建自己的许可证。 + * 不要创建自己的许可证。 + * 不要创建自己的许可证。 + + + +### 3\. README + +将一个名为 README.rst 的文件(使用 ReStructured Text 格式化)放在项目树的顶层。 + +GitHub 将像 Markdown 一样渲染 ReStructured Text,而 ReST 在 Python 的文档生态系统中的表现更好。 + +### 4\. 测试 + +写测试。这对你来说没有用处。但对于想要编写避免破坏相关功能的补丁的人来说,它非常有用。 + +测试可帮助协作者进行协作。 + +通常情况下,如果可以用 [**pytest**][4] 运行就最好了。还有其他测试工具 - 但很少有理由去使用它们。 + +### 5\. 样式 + +使用 linter 制定样式:PyLint、Flake8 或者带上 **\--check** 的 Black 。除非你使用Black,否则请确保在下载源代码文件中指定配置选项。 + +### 6\. API 文档 + +使用 docstrings 来记录模块、函数、类和方法。 + +你可以使用几种样式。我更喜欢 [Google 风格的 docstrings][5],但 [ReST docstrings][6] 也是一种选择。 + +Sphinx 可以同时处理 Google 风格和 ReST 的 docstrings,以将零散的文档集成为 API 文档。 + +### 7\. 零散文档 + +使用 [Sphinx][7]。(阅读[我们这篇文章][8]。)教程很有用,但同样重要的是要指明这是什么、它有什么好处、它有什么坏处、以及任何特殊的考虑因素。 + +### 8\. 构建 + +使用 **tox** 或 **nox** 自动运行测试、linter 并构建文档。这些工具支持“依赖矩阵”。这些矩阵往往会快速增长,但你可以尝试针对合理的样本进行测试,例如 Python 版本、依赖项版本以及可能安装的可选依赖项。 + +### 9\. 打包 + +使用 [setuptools][9] 工具。写一个 **setup.py** 和一个 **setup.cfg**。如果同时支持 Python 2 和 3,请在 **setup.cfg** 中指定 universal wheel。 + +**tox** 或 **nox** 应该做的一件事是构建 wheel 并对已安装的 wheel 进行测试。 + +避免使用 C 扩展。如果出于性能或绑定的原因一定需要它们,请将它们放在单独的包中。正确打包 C 扩展可以写一篇新的文章。这里有很多问题! + +### 10\. 持续集成 + +使用公共持续工具。[TravisCI][10] and [CircleCI][11] 为开源项目提供免费套餐。将 GitHub 或其他仓库配置为在合并拉请求之前需要先通过检查, 那么你就不必担心在代码评审中告知用户修复测试或样式。 + +### 11\. 版本 + +使用 [SemVer][12] 或 [CalVer][13]。有许多工具可以帮助你管理版本:[incremental][14]、[bumpversion][15] 和 [setuptools_scm][16] 等都是 PyPI 上的包,都可以帮助你管理版本。 + +### 12\. 发布 + +通过运行 **tox** 或 **nox** 并使用 **twine** 将文件上传到 PyPI 上发布。你可以通过在 [DevPI][17] 中“测试上传”。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/tips-open-sourcing-python-libraries + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://github.com/ +[2]: https://en.wikipedia.org/wiki/MIT_License +[3]: https://choosealicense.com/ +[4]: https://docs.pytest.org/en/latest/ +[5]: https://github.com/google/styleguide/blob/gh-pages/pyguide.md +[6]: https://www.python.org/dev/peps/pep-0287/ +[7]: http://www.sphinx-doc.org/en/master/ +[8]: https://opensource.com/article/18/11/building-custom-workflows-sphinx +[9]: https://pypi.org/project/setuptools/ +[10]: https://travis-ci.org/ +[11]: https://circleci.com/ +[12]: https://semver.org/ +[13]: https://calver.org/ +[14]: https://pypi.org/project/incremental/ +[15]: https://pypi.org/project/bumpversion/ +[16]: https://pypi.org/project/setuptools_scm/ +[17]: https://opensource.com/article/18/7/setting-devpi From 6fd0b0a89749722fdd6824206c69af66642e71a0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 29 Jan 2019 08:54:48 +0800 Subject: [PATCH 067/164] translating --- ... Get started with Tint2, an open source taskbar for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md b/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md index 601b90370c..e8afdbb417 100644 --- a/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md +++ b/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 378f6364157fbbfcb921364d36a7af66ae3d3132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=AE=A6=E6=88=90?= Date: Tue, 29 Jan 2019 08:57:11 +0800 Subject: [PATCH 068/164] =?UTF-8?q?=E7=94=B3=E9=A2=86=E7=BF=BB=E8=AF=91=20?= =?UTF-8?q?PyGame=20Zero-=20Games=20without=20boilerplate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tech/20190125 PyGame Zero- Games without boilerplate.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190125 PyGame Zero- Games without boilerplate.md b/sources/tech/20190125 PyGame Zero- Games without boilerplate.md index bdc100973a..f60c2b3407 100644 --- a/sources/tech/20190125 PyGame Zero- Games without boilerplate.md +++ b/sources/tech/20190125 PyGame Zero- Games without boilerplate.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (xiqingongzi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -88,7 +88,7 @@ via: https://opensource.com/article/19/1/pygame-zero 作者:[Moshe Zadka][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[xiqingongzi](https://github.com/xiqingongzi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b0eda2970907881f3b03188ae7fed413eaac748a Mon Sep 17 00:00:00 2001 From: dianbanjiu Date: Tue, 29 Jan 2019 12:14:31 +0800 Subject: [PATCH 069/164] translating --- ...ommands to help you monitor activity on your Linux server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md b/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md index 43f1c480ad..c2a95d7ec2 100644 --- a/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md +++ b/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (dianbanjiu ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f283796c03c073e841b320e0848a0118a2e8ab5f Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Tue, 29 Jan 2019 13:30:28 +0800 Subject: [PATCH 070/164] Translating An Introduction to Go. --- translated/tech/20181224 An Introduction to Go.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 3e595e4cea..0e4b77aadc 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -231,17 +231,17 @@ func Function() (err error) { ### 数组和切片 -As mentioned before, an array is a value type and a slice is a pointer into an array, created either by slicing an existing array or by using `make()` to create a slice, which will create an anonymous array to hold the elements. +正如前边说的,数组是值类型而切片是指向数组的指针。切片可以由现有的数组切片产生,也可以使用 `make()` 创建切片,这会创建一个匿名数组以保存元素。 ``` -slice1 := make([]int, 2, 5) // 5 elements allocated, 2 initialized to 0 -slice2 := array[:] // sliced entire array -slice3 := array[1:] // slice of array without first element +slice1 := make([]int, 2, 5) // 分配 5 个元素,其中 2 个初始化为0 +slice2 := array[:] // 整个数组的切片 +slice3 := array[1:] // 除了首元素的切片 ``` There are some more possible combinations for the slicing operator than mentioned above, but this should give a good first impression. -A slice can be used as a dynamically growing array, using the `append()` function. +使用 `append()` 函数,切片可以作为一个变长数组使用。 ``` slice = append(slice, value1, value2) @@ -252,11 +252,11 @@ Slices are also used internally to represent variable parameters in variable len ### Maps -Maps are simple key-value stores and support indexing and assigning. They are not thread-safe. +Maps 是简单的键值对储存容器并支持索引和分配。但它们不是线程安全的。 ``` someValue := someMap[someKey] -someValue, ok := someMap[someKey] // ok is false if key not in someMap +someValue, ok := someMap[someKey] // 如果键值不在 someMap 中,变量 ok 会赋值为 `false` someMap[someKey] = someValue ``` -------------------------------------------------------------------------------- From ce9dc3303ac2cc4b41c41edc5ae2d5b3521393d2 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 29 Jan 2019 20:18:35 +0800 Subject: [PATCH 071/164] PRF:20181214 The Linux terminal is no one-trick pony.md @geekpi --- ...14 The Linux terminal is no one-trick pony.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/translated/tech/20181214 The Linux terminal is no one-trick pony.md b/translated/tech/20181214 The Linux terminal is no one-trick pony.md index c33a8b0e85..b27a7d59e6 100644 --- a/translated/tech/20181214 The Linux terminal is no one-trick pony.md +++ b/translated/tech/20181214 The Linux terminal is no one-trick pony.md @@ -1,15 +1,17 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (The Linux terminal is no one-trick pony) [#]: via: (https://opensource.com/article/18/12/linux-toy-ponysay) [#]: author: (Jason Baker https://opensource.com/users/jason-baker) -Linux 终端能做其他事 +Linux 终端上的漂亮小马 ====== -将小马宝莉的魔力带到终端 + +> 将小马宝莉的魔力带到终端 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-ponysay.png?itok=ehl6pTr_) 欢迎再次来到 Linux 命令行玩具日历。如果这是你第一次访问该系列,你甚至可能会问自己什么是命令行玩具。我们正在思考中,但一般来说,它可能是一个游戏,或任何简单的消遣,可以帮助你在终端玩得开心。 @@ -22,11 +24,11 @@ Linux 终端能做其他事 我对此感到好奇,并去看了一下,发现没有让我失望。 -简而言之,**[ponysay][3]** 的 **cowsay**的重写,它包括了来自[小马宝莉][4]中的许多全彩色人物,你可以用它在 Linux 命令行输出短句。它实际上是一个非常完善的项目,拥有超过 400 个字符和字符组合,它还有让人难以置信的的[ 78 页的 PDF 文档][5]涵盖了了所有的用法。 +简而言之,[ponysay][3] 的 cowsay 的重写,它包括了来自[小马宝莉][4]中的许多全彩色人物,你可以用它在 Linux 命令行输出短句。它实际上是一个非常完善的项目,拥有超过 400 个字符和字符组合,它还有让人难以置信的的 [78 页的 PDF 文档][5]涵盖了所有的用法。 -要安装 **ponysay**,你需要查看项目的 [README][6] 来选择最适合你的发行版和情况的安装方法。由于 ponysay 似乎没有为我的 Fedora 发行版打包,我选择试用 Docker 容器镜像,但你可以选择最适合你的方法。从源码安装可能也适合你。 +要安装 `ponysay`,你需要查看项目的 [README][6] 来选择最适合你的发行版和情况的安装方法。由于 `ponysay` 似乎没有为我的 Fedora 发行版打包,我选择试用 Docker 容器镜像,但你可以选择最适合你的方法。从源码安装可能也适合你。 -作为一个业余容器用户,我很想试试 [**podman**][7] 来代替 **docker**。至少对于我而言,它可以正常工作。 +作为一个业余容器用户,我很想试试 [podman][7] 来代替 docker。至少对于我而言,它可以正常工作。 ``` $ podman run -ti --rm mpepping/ponysay 'Ponytastic' @@ -49,7 +51,7 @@ via: https://opensource.com/article/18/12/linux-toy-ponysay 作者:[Jason Baker][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3fe41b1cb7b10b41788e12782aecbee7c0757218 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 29 Jan 2019 20:19:15 +0800 Subject: [PATCH 072/164] PUB:20181214 The Linux terminal is no one-trick pony.md @geekpi https://linux.cn/article-10488-1.html --- .../20181214 The Linux terminal is no one-trick pony.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181214 The Linux terminal is no one-trick pony.md (98%) diff --git a/translated/tech/20181214 The Linux terminal is no one-trick pony.md b/published/20181214 The Linux terminal is no one-trick pony.md similarity index 98% rename from translated/tech/20181214 The Linux terminal is no one-trick pony.md rename to published/20181214 The Linux terminal is no one-trick pony.md index b27a7d59e6..f7c76392f9 100644 --- a/translated/tech/20181214 The Linux terminal is no one-trick pony.md +++ b/published/20181214 The Linux terminal is no one-trick pony.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10488-1.html) [#]: subject: (The Linux terminal is no one-trick pony) [#]: via: (https://opensource.com/article/18/12/linux-toy-ponysay) [#]: author: (Jason Baker https://opensource.com/users/jason-baker) From 26688ce9ba8ef73650403d8e1b24140119e0f60b Mon Sep 17 00:00:00 2001 From: MjSeven Date: Tue, 29 Jan 2019 21:03:44 +0800 Subject: [PATCH 073/164] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?20190123=20Getting=20started=20with=20Isotope..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Isotope, an open source webmail client.md | 60 ------------------ ... Isotope, an open source webmail client.md | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+), 60 deletions(-) delete mode 100644 sources/tech/20190123 Getting started with Isotope, an open source webmail client.md create mode 100644 translated/tech/20190123 Getting started with Isotope, an open source webmail client.md diff --git a/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md b/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md deleted file mode 100644 index 71307d1550..0000000000 --- a/sources/tech/20190123 Getting started with Isotope, an open source webmail client.md +++ /dev/null @@ -1,60 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with Isotope, an open source webmail client) -[#]: via: (https://opensource.com/article/19/1/productivity-tool-isotope) -[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) - -Getting started with Isotope, an open source webmail client -====== -Read rich-text emails with Isotope, a lightweight email client and the 11th in our series on open source tools that will make you more productive in 2019. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/newsletter_email_mail_web_browser.jpg?itok=Lo91H9UH) - -There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. - -Here's the 11th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. - -### Isotope - -As we discussed in the [fourth article in this series][1] (about Cypht), we all spend a whole lot of time dealing with email. There are many options for dealing with it, and I've spent hours upon hours trying to find the best email client that works for me. I think that is an important distinction: What works for me doesn't always work for everyone else. And sometimes what works for me is a full client like [Thunderbird][2], sometimes it is a console client like [Mutt][3], and sometimes it's a web-based interface like [Gmail][4] or [RoundCube][5]. - -![](https://opensource.com/sites/default/files/uploads/isotope_1.png) - -[Isotope][6] is a locally hosted, web-based email client. It is exceptionally lightweight, uses IMAP exclusively, and takes up very little disk space. Unlike Cypht, Isotope has full HTML mail support, which means there are no issues displaying rich-text only emails. - -![](https://opensource.com/sites/default/files/uploads/isotope_2_0.png) - -Installing Isotope is very easy if you have [Docker][7] installed. You only need to copy the commands from the documentation into a console and press Enter. Point a browser at **localhost** to get the Isotope login screen, and entering your IMAP server, login name, and password will open the inbox view. - -![](https://opensource.com/sites/default/files/uploads/isotope_3.png) - -At this point, Isotope functions pretty much as you'd expect. Click a message to view it, click the pencil icon to create a new message, etc. You will note that the user interface (UI) is very minimalistic and doesn't have the typical buttons for things like "move to folder," "copy to folder," and "archive." You move messages around with drag and drop, so you don't really miss the buttons anyway. - -![](https://opensource.com/sites/default/files/uploads/isotope_4.png) - -Overall, Isotope is clean, fast, and works exceptionally well. Even better, it is under active development (the most recent commit was two hours before I wrote this article), so it is constantly getting improvements. You can check out the code and contribute to it on [GitHub][8]. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/productivity-tool-isotope - -作者:[Kevin Sonney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ksonney (Kevin Sonney) -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/article/19/1/productivity-tool-cypht-email -[2]: https://www.thunderbird.net/ -[3]: http://www.mutt.org/ -[4]: https://mail.google.com/ -[5]: https://roundcube.net/ -[6]: https://blog.marcnuri.com/isotope-mail-client-introduction/ -[7]: https://www.docker.com/ -[8]: https://github.com/manusa/isotope-mail diff --git a/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md b/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md new file mode 100644 index 0000000000..0598fc8963 --- /dev/null +++ b/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md @@ -0,0 +1,62 @@ +[#]: collector: (lujun9972) +[#]: translator: (MjSeven) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with Isotope, an open source webmail client) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-isotope) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + + +Isotope 入门:一个开源的 Web 邮件客户端 +====== +使用 Isotope(一个轻量级的电子邮件客户端)阅读富文本电子邮件,它是我们在开源工具系列的第 11 个,将使你在 2019 年更高效。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/newsletter_email_mail_web_browser.jpg?itok=Lo91H9UH) + +在每年的年初,似乎都有一股疯狂的寻找提高工作效率方法的冲动。新年决心,渴望以正确的方式开始新的一年。当然,“旧不去的,新的不来”的态度都会导致这种情况。一般的建议都偏向于私有和专业软件,然而并不是必须这样。 + +以下是我挑选的 19 个新的(或者对你来说是新的)开源工具中的第 11 个,它将帮助你在 2019 年提高工作效率。 + +### Isotope + +正如我们在[本系列的第四篇文章][1](关于 Cypht)中所讨论的那样,我们花了很多时间来处理电子邮件。有很多方法可以解决它,我已经花了很多时间来寻找最适合我的电子邮件客户端。我认为这是一个重要的区别:对我有效的方法并不总是对其它人有效。有时对我有用的是像 [Thunderbird][2] 这样的完整客户端,有时是像 [Mutt][3] 这样的控制台客户端,有时是像 [Gmail][4] 和 [RoundCube][5] 这样基于 Web 的界面。 + +![](https://opensource.com/sites/default/files/uploads/isotope_1.png) + +[Isotope][6] 是一个本地托管的,基于 Web 的电子邮件客户端。它非常轻巧,只使用 IMAP 协议,占用的磁盘空间非常小。与 Cypht 不同,Isotope 具有完整的 HTML 邮件支持,这意味着显示富文本电子邮件没有问题。 + +![](https://opensource.com/sites/default/files/uploads/isotope_2_0.png) + +如果你安装了 [Docker][7],那么安装 Isotope 非常容易。你只需将文档中的命令复制到控制台中,然后按下 Enter 键。在浏览器中输入 **localhost** 来获取 Isotope 登录界面,输入你的 IMAP 服务器,登录名和密码将打开收件箱视图。 + +![](https://opensource.com/sites/default/files/uploads/isotope_3.png) + +在这一点上,Isotope 的功能和你想象的差不多。单击消息进行查看,单击铅笔图标以创建新邮件等。你会注意到用户界面(UI)非常简单,没有“移动到文件夹”,“复制到文件夹”和“存档”等常规按钮。你可以通过拖动来移动消息,因此无论如何你都不会错过这些按钮。 + +![](https://opensource.com/sites/default/files/uploads/isotope_4.png) + +总的来说,Isotope 干净,速度快,工作得非常好。更棒的是,它正在积极开发中(最近一次的提交是在我撰写本文的两小时之前),所以它正在不断得到改进。你可以查看代码并在 [GitHub][8] 上为它做出贡献。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-isotope + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/article/19/1/productivity-tool-cypht-email +[2]: https://www.thunderbird.net/ +[3]: http://www.mutt.org/ +[4]: https://mail.google.com/ +[5]: https://roundcube.net/ +[6]: https://blog.marcnuri.com/isotope-mail-client-introduction/ +[7]: https://www.docker.com/ +[8]: https://github.com/manusa/isotope-mail From eff9a28f2a3abfcb269facef3f7c68ece61dd75e Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 29 Jan 2019 21:53:17 +0800 Subject: [PATCH 074/164] PRF:20190118 Top 5 Linux Server Distributions.md @wxy --- .../tech/20190118 Top 5 Linux Server Distributions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translated/tech/20190118 Top 5 Linux Server Distributions.md b/translated/tech/20190118 Top 5 Linux Server Distributions.md index b263bb3b89..89f86ab016 100644 --- a/translated/tech/20190118 Top 5 Linux Server Distributions.md +++ b/translated/tech/20190118 Top 5 Linux Server Distributions.md @@ -1,13 +1,13 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Top 5 Linux Server Distributions) [#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) [#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) -另一种 5 个顶级 Linux 服务器发行版 +5 个用于 SOHO 的 Linux 服务器发行版 ====== > Jack Wallen 为 Linux 服务器发行版提供了一些可靠的选择,绝对值回票价。 @@ -166,7 +166,7 @@ via: https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions 作者:[Jack Wallen][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6d3de7543e00804d3cab3c92ca7e4fc44640e3ba Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 29 Jan 2019 21:54:24 +0800 Subject: [PATCH 075/164] PUB:20190118 Top 5 Linux Server Distributions.md @wxy https://linux.cn/article-10490-1.html --- .../20190118 Top 5 Linux Server Distributions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190118 Top 5 Linux Server Distributions.md (99%) diff --git a/translated/tech/20190118 Top 5 Linux Server Distributions.md b/published/20190118 Top 5 Linux Server Distributions.md similarity index 99% rename from translated/tech/20190118 Top 5 Linux Server Distributions.md rename to published/20190118 Top 5 Linux Server Distributions.md index 89f86ab016..e1515510a3 100644 --- a/translated/tech/20190118 Top 5 Linux Server Distributions.md +++ b/published/20190118 Top 5 Linux Server Distributions.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10490-1.html) [#]: subject: (Top 5 Linux Server Distributions) [#]: via: (https://www.linux.com/blog/learn/2019/1/top-5-linux-server-distributions) [#]: author: (Jack Wallen https://www.linux.com/users/jlwallen) From ba2842017d51ed3b2c52946f55bce7e9709214be Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 29 Jan 2019 22:54:16 +0800 Subject: [PATCH 076/164] Update 20171222 10 keys to quick game development.md --- ...71222 10 keys to quick game development.md | 69 +++++++++---------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/sources/talk/20171222 10 keys to quick game development.md b/sources/talk/20171222 10 keys to quick game development.md index 50c8164ae0..5897adaae8 100644 --- a/sources/talk/20171222 10 keys to quick game development.md +++ b/sources/talk/20171222 10 keys to quick game development.md @@ -1,78 +1,77 @@ -XYenChi is translating -10 keys to quick game development +快速开发游戏的十个关键 ====== ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb) -In early October, the inaugural [Open Jam][1] sponsored by Opensource.com drew 45 entries from teams located around the world. The teams had just three days to create a game using open source software to enter into the competition, and [three teams came out on top][2]. +十月早些时候,Opensource.com赞助的 [Open Jam][1] 入职仪式为处于世界各地的团队设立了45个入口。这些队伍只有三天时间用开源软件制作出一个游戏来参与角逐,并 [取前三][2]。 -We hosted our own Open Jam event at our university for anyone who wanted to participate. We reserved a computer lab for the weekend and taught people how to use open source software--[Godot][3] for the game engine, [LMMS][4] for music creation, [GIMP][5] for 2D art, and [Blender][6] for 3D art--to create games and game art assets. Three games were submitted from our event: [Loathsome][7], [Lost Artist][8], and [Paint Rider][9] (which I created). +我们在大学为每一位愿意参与的人举办了我们自己的 Open Jam 活动。周末预留了计算机实验室教大家使用开源软件——游戏引擎:[Godot][3],音乐:[LMMS][4] ,2D画面: [GIMP][5] 和3D画面 [Blender][6] ——来创作游戏和相关组件。活动产出了三个游戏: [Loathsome][7], [Lost Artist][8], 和 [Paint Rider][9] (我做的)。 -From my experience with game jams and game development in general, here are 10 lessons I've learned about game engines, coding, and rapid game development. +总的说来,我从游戏创作和游戏开发中,学到了十课关于游戏引擎、代码和快速游戏开发。 -## 1\. Narrow your scope +## 1\. 限定规模 -It's easy to get carried away with ideas to make an expansive adventure game or something that compares to your favorite game. Pursuing that outside of a game jam can be awesome, once you have some experience, but don't overestimate what you have time for. What I love about game jams is they force you to focus on getting a game from the conceptual stage to a final product quickly, since you have such a limited amount of time. This is why narrowing your scope is so important. +很容易想要去做一个规模宏大的冒险游戏或者比拟你最喜欢的游戏的东西。追求高于游戏创作之外的东西可能很酷,如果你有体会,但不要高估自己拥有的时间。我欣赏游戏创作的一点是强制你快速将一个游戏从概念阶段变成最终产品,因为你的时间非常有限。这也就是限定规模如此重要。 -The theme for Open Jam was "Leave a Mark." As soon as it was announced, my friends and I started brainstorming games that could fit that theme. One idea was a 3D boxing game where the player left bruises on their enemy. I had very little experience making 3D games and, while I would have loved to get better at them, I probably would have spent too much time learning how to get all the textures situated and hit boxes working before I could even start to figure out what would make a fun game. +Open Jam 的主题是“留下痕迹”,题目一出来,我和朋友就开始讨论什么样的游戏合题意。有个想法就是做玩家能在敌人身上留下伤痕的3D拳击游戏。我几乎没有做3D游戏的经验,我想做好的话,在我甚至还没发掘出可玩性之前,就得花太多时间在学习如何让痕迹合理和打击有效。 -## 2\. Have something playable very early +## 2\. 尽早可玩 -This is my favorite advice for game jams. Try to come up with the core mechanics and code them to a working state quickly so you can test them and decide whether it's worthy of making a full game. You shouldn't be hours away from the deadline and still trying to get your game playable. For a three-day jam like Open Jam, it shouldn't take more than a few hours to have some sort of demo running. +对游戏创作我最中肯的建议就是这。试着做出核心部件,快速写出代码,这样你就可以测试并决定它是否值得做成一个完整的游戏。不应该只剩几个小时截止了,才让你的游戏可玩。像 Open Jam 这样的三天创作,最好少花时间在实现概念上。 -## 3\. Keep it simple +## 3\. 保持简单 -Every feature that you want to include extends your total development time. You never know if committing to a feature will lead to a major time sink because you just can't quite get it to work. Arcade-style high-score games typically work well for game jams because they're usually simple by nature. Once you've finished the core, you can start adding features and polish without having to worry whether you'll have a functioning game in the end. +你想加入的每个特性都会延长整个开发时间。因为你不能迅速使之运行,所以无从得知提交一个新特性是否会消耗大量时间。街机风格的高分作品往往会在游戏创作中表现良好,它们天生就很简单。一旦核心部分完成,你可以开始加入特性并润色,无需担心最后游戏是否功能强大。 -## 4\. Take inspiration from other games +## 4\. 从其他游戏获取灵感 -You may be tempted to create something totally original, but having models to base your work on is extremely helpful. It will decrease the time it takes to come up with the mechanics, since you'll already have an idea of what is fun. Remind yourself that the more experience you have under your belt, the easier it is to create that massive game you have so many ideas for, so you might as well practice by trying to recreate things other people have done. +可能你想做出完全原创的作品,但作品的原型极其有用。原型将节省重复劳动的时间,因为你已经知道什么有趣。告诉自己实践的经验越多,越容易做出包含自己想法的大型游戏,自然你也能从再创作其他人的作品中很好地练习。 -Considering Open Jam's "Leave a Mark" theme, I thought it would be fun to create a game where you leave a trail of paint as you played, so you could see the mark you left. I remembered the old Flash game [Line Rider 2 Beta][10] (hence the name Paint Rider), and about the secret feature where you could draw a track if you held the Control button down while you played. I simplified that concept even more by requiring only one button for vertical movement (much like old helicopter games). About an hour or two into the jam, I had a basic demo where you could move up or down with one button and leave a trail of little black circles. +考虑到 Open Jam 的“留下痕迹”主题,我觉得创作一个玩的时候可以留下颜料痕迹的游戏会很有趣,这样也可以看到你留下的标记。我记得这款老式动画游戏 [Line Rider 2 Beta][10] (后来叫 Paint Rider),而且知道玩的时候按住 Control 键可以画出痕迹的彩蛋。我简化了概念,甚至只需要一个按键来垂直移动。(更像老式飞机游戏)。大概一两个小时的创作,我有了基本模型,用一个按钮上下移动和留下小黑圈的痕迹。 -## 5\. Don't overlook accessibility +## 5\. 不要忽视可得性 -Make sure as many people as possible can play your game. One of the games submitted to Open Jam was a virtual-reality game. As cool as that was, hardly anyone was able to play it, because not many people have a VR device. Luckily, its developer didn't expect it would do well in the ratings, and instead considered it practice. But, if you want to share your game with lots of people (or win game jams), it's important to pay attention to accessibility. +确保尽可能多的人能玩你的游戏。某个提交到 Open Jam 的游戏是虚拟现实游戏。尽管那很酷,但几乎没有人可以玩,因为拥有VR设备的人不多。所幸它的开发者并不期望取得好名次,只是想练手。但如果你想和人们分享你的游戏(或者赢得游戏创作),注意可得性是很重要的。 -Godot (and most other game engines) allow you to export your game to all major platforms. When submitting a game specifically to [Itch.io][11], having an in-browser version will allow most people to play it. But always look into exporting to as many platforms and operating systems as you can. I even tried exporting Paint Rider to mobile, but technical difficulties got in the way. +Godot (和其他大多数游戏引擎)允许你在所有主流平台发布游戏。提交游戏时,特别是在 [Itch.io][11],有浏览器版本将支持大多数人玩。但尽你所能去发布在更多的平台和开放系统上。我甚至试着在移动端发布 Paint Rider ,但技术有限。 -## 6\. Don't make it too difficult +## 6\. 不要做得太难 -If your game takes too much effort to learn or play, you'll lose a portion of your audience. This aligns nicely with keeping your game simple and within scope, and it puts even more importance on the game planning phase. Again, it's easy to come up with an epic game idea you could spend weeks or months developing; it's harder to come up with a good, simple game. +如果游戏需要花费过多精力去学或者玩,你将失去一部分玩家。这照应了保持简单和限定规模,在游戏计划阶段非常重要。再次重申,想做一个宏大的游戏花上十天半个月开发很容易;难的是做出好玩、简单的游戏。 -I showed Paint Rider to my Mom and she was able to play it immediately. I don't think I need to say anything more about that. +给妈妈介绍了 Paint Rider 之后,她很快开始玩起来,我认为不需要跟她说明更多。 -## 7\. Don't be too neat +## 7\. 不用太整洁 -If you're used to taking your time applying design patterns everywhere and making sure that your code will be reusable and readable, try to loosen up a bit. If you spend too much time worrying about design, when you finally get to the point when you can play your game, you may find out it's not very fun. By then, it's too late to make changes. +如果你习惯于花时间在设计每处图案和确保代码可复用、可适应,试着放松一点。如果你花太多时间考虑设计,当你最后到了可以玩游戏的时候,你可能发现游戏不是很有趣,那时候就来不及修改了。 -This process is also used for prototyping more serious games: You quickly code up messy proof-of-concept demos until you find one that's worth making into a full game, then you dive into building a perfect code base to support it. Creating a game for a game jam is like quickly coding up a proof of concept. +这过程也适用于简化更严格的游戏:快速码出验证概念性展示模型直到找出值得做成完整游戏的,然后你潜心建立完美的代码基础来支持它。游戏创作的开发游戏就像快速码出可验证的理念。 -## 8\. But don't be too messy, either +## 8\. 但也不要太随意 -On the other hand, [spaghetti code][12] can easily get out of control, even if there's not a ton of code in a game. Luckily, most game engines are built with design patterns in mind. Take Godot's [Signals][13] functionality, which allows nodes to send messages with data to nodes they've been "connected" with--it's the [observer pattern][14] automatically baked into your design. As long as you know how to take advantage of the game engine's features, you should be able to code quickly without making your code too painful to look at. +另一方面, [意大利面式代码][12] 容易失控,即使游戏开发没有大量代码。还好大多是游戏引擎用脑中的设计图建成。Luckily, most game engines are built with design patterns in mind. 就拿 Godot 的[信号][13] 功能来说,节点可以发送数据信息给它们“连上了”的节点——这是你的设计自动成型的[观测图][14]。 只要你知道如何利用游戏引擎的特性,就可以快速写代码,你的代码也不会特别难读。 -## 9\. Get feedback +## 9\. 取得反馈 -Show people what you're working on. Have them try it out and see what they say about it. Watch how they play your game and see if they find something you didn't expect. If the game jam has a [Discord][15] channel or something similar, post your game there, or bounce your ideas off people. One of Paint Rider's defining features is that the canvas loops, so you see the paint you left before. I hadn't even considered that mechanic until someone asked me why the game didn't have it. +向人们展示你正在做的。让他们试一试并看看他们说些啥。看看他们如何玩你的游戏,找找他们有没有发现你期望之外的事。如果游戏创作有[争论][15] 频道或者类似的,把你的游戏放上去,人们会反馈你的想法。 Paint Rider 的定义功能之一是画布循环,所以你可以看到之前留下来的画。在有人问我为什么这个游戏没有之前,我甚至没有考虑那个设置。 -Working on a team will ensure that there are other people built into the process who can pass feedback around. +团队协作的话,确保有其他可以传递周围反馈的人参与这个开发。 -And don't forget to help other people out in the same way; it's a win-win if you realize something that could help your game while you're playing someone else's game. +而且不要忘了用相同的方式帮助其他人;如果你在玩其他人游戏的时候发现了有助于你游戏的东西,这就是双赢。 -## 10\. Know where to find resources +## 10\. 哪里找资源 -Creating all your own assets can really slow you down. During Open Jam, I noticed that Loathsome's developer was spending multiple hours drawing the main character while I was busy incorporating new features and fixing bugs. You could simplify your art style for the game and still come up with something that looks and sounds good, but there are other options. Try looking for assets in [Creative Commons][16] or on free music sites like [Anttis Instrumentals][17]. Or, if possible, form a team with a dedicated artist, writer, or musician. +做出所有你自己的组件真的会拖你后腿。 Open Jam 期间,当我忙于组装新特性和修漏洞时,我注意到 Loathsome 的开发者花了大量时间在绘制主要角色 developer was spending multiple hours drawing the main character while I was busy incorporating new features and fixing bugs. 你可以简化游戏的艺术风格创作并且用一些视听效果尚可的东西,这里有其他选择。试着在 [Creative Commons][16] 上寻找组件或者免费音乐站点,比如 [Anttis Instrumentals][17] 。或者,可行的话,组一个有专门艺术家、作家或者音乐家的团队。 -Other software you might find useful includes [Krita][18], an open source 2D image creator that's nice for digital painting, especially if you have a drawing tablet, and [sfxr][19], a game sound-effect creator that has a lot of parameters to play with, but as its creator says: "Basic usage involves hitting the randomize button." (All sound effects in Paint Rider were made with Sfxr.) You can also check out [Calinou][20]'s large and neatly organized list of open source game development software. +其他你可能觉得有用的软件有 [Krita][18] ,一款适合数字绘画的开源 2D 图像生成软件,特别是如果你有一块绘图板,还有 [sfxr][19] ,一款游戏音效生成软件,很多参数可以调,但正如它的开发者所说:“基本用法包括了按下随机按钮。”( Paint Rider 的所有音效都是用 Sfxr 做的。)你也可以试试 [Calinou][20] 的众多但有序的开源游戏开发软件列表。 -Have you participated in Open Jam or another a game jam and have other advice? Or do you have questions I didn't address? If so, please share them in the comments. +你参加 Open Jam 或者其他游戏创作并有别的建议吗?对我未提及的有问题吗?有的话,请在评论中分享。 -------------------------------------------------------------------------------- via: https://opensource.com/article/17/12/10-keys-rapid-open-source-game-development 作者:[Ryan Estes][a] -译者:[译者ID](https://github.com/译者ID) +译者:[XYenChi](https://github.com/XYenChi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 324999d2167cff2db5adf1c1d24a8f8334d18057 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 29 Jan 2019 23:27:02 +0800 Subject: [PATCH 077/164] Create 20171222 10 keys to quick game development.md --- ...71222 10 keys to quick game development.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 translated/talk/20171222 10 keys to quick game development.md diff --git a/translated/talk/20171222 10 keys to quick game development.md b/translated/talk/20171222 10 keys to quick game development.md new file mode 100644 index 0000000000..c41f66bfc7 --- /dev/null +++ b/translated/talk/20171222 10 keys to quick game development.md @@ -0,0 +1,99 @@ +快速开发游戏的十个关键 +====== +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb) + +十月早些时候,Opensource.com赞助的 [Open Jam][1] 入职仪式为处于世界各地的团队设立了45个入口。这些队伍只有三天时间用开源软件制作出一个游戏来参与角逐,并 [取前三][2]。 + +我们在大学为每一位愿意参与的人举办了我们自己的 Open Jam 活动。周末预留了计算机实验室教大家使用开源软件——游戏引擎:[Godot][3],音乐:[LMMS][4] ,2D画面: [GIMP][5] 和3D画面 [Blender][6] ——来创作游戏和相关组件。活动产出了三个游戏: [Loathsome][7], [Lost Artist][8], 和 [Paint Rider][9] (我做的)。 + +总的说来,我从游戏创作和游戏开发中,学到了十课关于游戏引擎、代码和快速游戏开发。 + +## 1\. 限定规模 + +很容易想要去做一个规模宏大的冒险游戏或者比拟你最喜欢的游戏的东西。追求高于游戏创作之外的东西可能很酷,如果你有体会,但不要高估自己拥有的时间。我欣赏游戏创作的一点是强制你快速将一个游戏从概念阶段变成最终产品,因为你的时间非常有限。这也就是限定规模如此重要。 + +Open Jam 的主题是“留下痕迹”,题目一出来,我和朋友就开始讨论什么样的游戏合题意。有个想法就是做玩家能在敌人身上留下伤痕的3D拳击游戏。我几乎没有做3D游戏的经验,我想做好的话,在我甚至还没发掘出可玩性之前,就得花太多时间在学习如何让痕迹合理和打击有效。 + +## 2\. 尽早可玩 + +对游戏创作我最中肯的建议就是这。试着做出核心部件,快速写出代码,这样你就可以测试并决定它是否值得做成一个完整的游戏。不应该只剩几个小时截止了,才让你的游戏可玩。像 Open Jam 这样的三天创作,最好少花时间在实现概念上。 + +## 3\. 保持简单 + +你想加入的每个特性都会延长整个开发时间。因为你不能迅速使之运行,所以无从得知提交一个新特性是否会消耗大量时间。街机风格的高分作品往往会在游戏创作中表现良好,它们天生就很简单。一旦核心部分完成,你可以开始加入特性并润色,无需担心最后游戏是否功能强大。 + +## 4\. 从其他游戏获取灵感 + +可能你想做出完全原创的作品,但作品的原型极其有用。原型将节省重复劳动的时间,因为你已经知道什么有趣。告诉自己实践的经验越多,越容易做出包含自己想法的大型游戏,自然你也能从再创作其他人的作品中很好地练习。 + +考虑到 Open Jam 的“留下痕迹”主题,我觉得创作一个玩的时候可以留下颜料痕迹的游戏会很有趣,这样也可以看到你留下的标记。我记得这款老式动画游戏 [Line Rider 2 Beta][10] (后来叫 Paint Rider),而且知道玩的时候按住 Control 键可以画出痕迹的彩蛋。我简化了概念,甚至只需要一个按键来垂直移动。(更像老式飞机游戏)。大概一两个小时的创作,我有了基本模型,用一个按钮上下移动和留下小黑圈的痕迹。 + +## 5\. 不要忽视可得性 + +确保尽可能多的人能玩你的游戏。某个提交到 Open Jam 的游戏是虚拟现实游戏。尽管那很酷,但几乎没有人可以玩,因为拥有VR设备的人不多。所幸它的开发者并不期望取得好名次,只是想练手。但如果你想和人们分享你的游戏(或者赢得游戏创作),注意可得性是很重要的。 + +Godot (和其他大多数游戏引擎)允许你在所有主流平台发布游戏。提交游戏时,特别是在 [Itch.io][11],有浏览器版本将支持大多数人玩。但尽你所能去发布在更多的平台和开放系统上。我甚至试着在移动端发布 Paint Rider ,但技术有限。 + +## 6\. 不要做得太难 + +如果游戏需要花费过多精力去学或者玩,你将失去一部分玩家。这照应了保持简单和限定规模,在游戏计划阶段非常重要。再次重申,想做一个宏大的游戏花上十天半个月开发很容易;难的是做出好玩、简单的游戏。 + +给妈妈介绍了 Paint Rider 之后,她很快开始玩起来,我认为不需要跟她说明更多。 + +## 7\. 不用太整洁 + +如果你习惯于花时间在设计每处图案和确保代码可复用、可适应,试着放松一点。如果你花太多时间考虑设计,当你最后到了可以玩游戏的时候,你可能发现游戏不是很有趣,那时候就来不及修改了。 + +这过程也适用于简化更严格的游戏:快速码出验证概念性展示模型直到找出值得做成完整游戏的,然后你潜心建立完美的代码基础来支持它。游戏创作的开发游戏就像快速码出可验证的理念。 + +## 8\. 但也不要太随意 + +另一方面, [意大利面式代码][12] 容易失控,即使游戏开发没有大量代码。还好大多是游戏引擎用脑中的设计图建成。就拿 Godot 的[信号][13] 功能来说,节点可以发送数据信息给它们“连上了”的节点——这是你的设计自动成型的[观测图][14]。 只要你知道如何利用游戏引擎的特性,就可以快速写代码,你的代码也不会特别难读。 + +## 9\. 取得反馈 + +向人们展示你正在做的。让他们试一试并看看他们说些啥。看看他们如何玩你的游戏,找找他们有没有发现你期望之外的事。如果游戏创作有[争论][15] 频道或者类似的,把你的游戏放上去,人们会反馈你的想法。 Paint Rider 的定义功能之一是画布循环,所以你可以看到之前留下来的画。在有人问我为什么这个游戏没有之前,我甚至没有考虑那个设置。 + +团队协作的话,确保有其他可以传递周围反馈的人参与这个开发。 + +而且不要忘了用相同的方式帮助其他人;如果你在玩其他人游戏的时候发现了有助于你游戏的东西,这就是双赢。 + +## 10\. 哪里找资源 + +做出所有你自己的组件真的会拖你后腿。 Open Jam 期间,当我忙于组装新特性和修漏洞时,我注意到 Loathsome 的开发者花了大量时间在绘制主要角色上,你可以简化游戏的艺术风格创作并且用一些视听效果尚可的东西,这里有其他选择。试着在 [Creative Commons][16] 上寻找组件或者免费音乐站点,比如 [Anttis Instrumentals][17] 。或者,可行的话,组一个有专门艺术家、作家或者音乐家的团队。 + +其他你可能觉得有用的软件有 [Krita][18] ,一款适合数字绘画的开源 2D 图像生成软件,特别是如果你有一块绘图板,还有 [sfxr][19] ,一款游戏音效生成软件,很多参数可以调,但正如它的开发者所说:“基本用法包括了按下随机按钮。”( Paint Rider 的所有音效都是用 Sfxr 做的。)你也可以试试 [Calinou][20] 的众多但有序的开源游戏开发软件列表。 + +你参加 Open Jam 或者其他游戏创作并有别的建议吗?对我未提及的有问题吗?有的话,请在评论中分享。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/17/12/10-keys-rapid-open-source-game-development + +作者:[Ryan Estes][a] +译者:[XYenChi](https://github.com/XYenChi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://opensource.com/users/figytuna +[1]:https://itch.io/jam/open-jam-1 +[2]:https://opensource.com/article/17/11/open-jam +[3]:https://godotengine.org/ +[4]:https://lmms.io/ +[5]:https://www.gimp.org/ +[6]:https://www.blender.org/ +[7]:https://astropippin.itch.io/loathsome +[8]:https://masonraus.itch.io/lost-artist +[9]:https://figytuna.itch.io/paint-rider +[10]:http://www.andkon.com/arcade/racing/lineriderbeta2/ +[11]:https://itch.io/ +[12]:https://en.wikipedia.org/wiki/Spaghetti_code +[13]:http://kidscancode.org/blog/2017/03/godot_101_07/ +[14]:https://en.wikipedia.org/wiki/Observer_pattern +[15]:https://discordapp.com/ +[16]:https://creativecommons.org/ +[17]:http://www.soundclick.com/bands/default.cfm?bandID=1277008 +[18]:https://krita.org/en/ +[19]:http://www.drpetter.se/project_sfxr.html +[20]:https://notabug.org/Calinou/awesome-gamedev/src/master/README.md From 088c6b86b70ea58aeaf5b34e071e5968f156c2af Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Tue, 29 Jan 2019 23:31:44 +0800 Subject: [PATCH 078/164] hankchow translated --- ...12 Top 5 configuration management tools.md | 122 ------------------ ...12 Top 5 configuration management tools.md | 120 +++++++++++++++++ 2 files changed, 120 insertions(+), 122 deletions(-) delete mode 100644 sources/tech/20181212 Top 5 configuration management tools.md create mode 100644 translated/tech/20181212 Top 5 configuration management tools.md diff --git a/sources/tech/20181212 Top 5 configuration management tools.md b/sources/tech/20181212 Top 5 configuration management tools.md deleted file mode 100644 index f7e59bcf08..0000000000 --- a/sources/tech/20181212 Top 5 configuration management tools.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (HankChow) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 5 configuration management tools) -[#]: via: (https://opensource.com/article/18/12/configuration-management-tools) -[#]: author: (Marco Bravo https://opensource.com/users/marcobravo) - -Top 5 configuration management tools -====== -Learn about configuration management tools and figure out which will work best for your DevOps organization. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M) - -DevOps is evolving and gaining traction as organizations discover how it enables them to produce better applications and reduce their software products' time to market. - -[DevOps' core values][1] are Culture, Automation, Measurement, and Sharing (CAMS), and an organization's adherence to them influences how successful it is. - - * **Culture** brings people and processes together; - * **Automation** creates a fabric for DevOps; - * **Measurement** permits improvements; and - * **Sharing** enables the feedback loop in the CAMS cycle. - - - -Another DevOps concept is the idea that almost everything can be managed in code: servers, databases, networks, log files, application configurations, documentation, automated tests, deployment processes, and more. - -In this article, I'll focus on one aspect of automation: Configuration management. As part of [Infrastructure as Code][2] (IaC), configuration management tools enable the use of tested and proven software development practices for managing and provisioning data centers through plaintext definition files. - -By manipulating simple configuration files, a DevOps team can use application development best practices, such as version control, testing, small deployments, and design patterns. In short, this means code can be written to provision and manage an infrastructure as well as automate processes. - -### Why use configuration management tools? - -Configuration management tools enable changes and deployments to be faster, repeatable, scalable, predictable, and able to maintain the desired state, which brings controlled assets into an expected state. - -Some advantages of using configuration management tools include: - - * Adherence to coding conventions that make it easier to navigate code - * Idempotency, which means that the end state remains the same, no matter how many times the code is executed - * Distribution design to improve managing large numbers of remote servers - - - -Some configuration management tools use a pull model, in which an agent installed on the servers runs periodically to pull the latest definitions from a central repository and apply them to the server. Other tools use a push model, where a central server triggers updates to managed servers. - -### Top 5 configuration management tools - -There are a variety of configuration management tools available, and each has specific features that make it better for some situations than others. Yet the top five configuration management tools, presented below in alphabetical order, have several things in common that I believe are essential for DevOps success: all have an open source license, use externalized configuration definition files, run unattended, and are scriptable. All of the descriptions are based on information from the tools' software repositories and websites. - -#### Ansible - -"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications—automate in a language that approaches plain English, using SSH, with no agents to install on remote systems." —[GitHub repository][3] - -Ansible is one of my favorite tools; I started using it several years ago and fell in love with it. You can use Ansible to execute the same command for a list of servers from the command line. You can also use it to automate tasks using "playbooks" written into a YAML file, which facilitate communication between teams and non-technical people. Its main advantages are that it is simple, agentless, and easy to read (especially for non-programmers). - -Because agents are not required, there is less overhead on servers. An SSH connection is necessary when running in push mode (which is the default), but pull mode is available if needed. [Playbooks][4] can be written with a minimal set of commands or they can be scaled for more elaborate automation tasks that could include roles, variables, and modules written by other people. - -You can combine Ansible with other tools to create a central console to control processes. Those tools include Ansible Works (AWX), Jenkins, RunDeck, and [ARA][5], which offers [traceability when running playbooks][6]. - -### CFEngine - -"CFEngine 3 is a popular open source configuration management system. Its primary function is to provide automated configuration and maintenance of large-scale computer systems." —[GitHub repository][7] - -CFEngine was introduced by Mark Burgess in 1993 as a scientific approach to automated configuration management. The goal was to deal with the entropy in computer systems' configuration and resolve it with end-state "convergence." Convergence means a desired end-state and elaborates on idempotence as a capacity to reach the desired end-state. Burgess' research evolved in 2004 when he proposed the [Promise theory][8] as a model of voluntary cooperation between agents. - -The current version of CFEngine incorporates Promise theory and uses agents running on each server that pull the configuration from a central repository. It requires some expert knowledge to deal with configurations, so it's best suited for technical people. - -### Chef - -"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure." —[GitHub repository][9] - -Chef uses "recipes" written in Ruby to keep your infrastructure running up-to-date and compliant. The recipes describe a series of resources that should be in a particular state. Chef can run in client/server mode or in a standalone configuration named [chef-solo][10]. It has good integration with the major cloud providers to automatically provision and configure new machines. - -Chef has a solid user base and provides a full toolset to allow people with different technical backgrounds and skills to interact around the recipes. But, at its base, it is more technically oriented tool. - -### Puppet - -"Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs administrative tasks (such as adding users, installing packages, and updating server configurations) based on a centralized specification." —[GitHub repository][11] - -Conceived as a tool oriented toward operations and sysadmins, Puppet has consolidated as a configuration management tool. It usually works in a client-server architecture, and an agent communicates with the server to fetch configuration instructions. - -Puppet uses a declarative language or Ruby to describe the system configuration. It is organized in modules, and manifest files contain the desired-state goals to keep everything as required. Puppet uses the push model by default, and the pull model can be configured. - -### Salt - -"Software to automate the management and configuration of any infrastructure or application at scale." — [GitHub repository][12] - -Salt was created for high-speed data collection and scale beyond tens of thousands of servers. It uses Python modules to handle configuration details and specific actions. These modules manage all of Salt's remote execution and state management behavior. Some level of technical skills are required to configure the modules. - -Salt uses a client-server topology (with the Salt master as server and Salt minions as clients). Configurations are kept in Salt state files, which describe everything required to keep a system in the desired state. - -### Conclusion - -The landscape of DevOps tools is evolving all the time, and it is important to keep an eye on the changes. I hope this article will encourage you to explore these concepts and tools further. If so, the Cloud Native Computing Foundation (CNCF) maintains a good reference in the [Cloud Native Landscape Project][13]. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/12/configuration-management-tools - -作者:[Marco Bravo][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/marcobravo -[b]: https://github.com/lujun9972 -[1]: https://www.oreilly.com/learning/why-use-terraform -[2]: https://www.oreilly.com/library/view/infrastructure-as-code/9781491924334/ch04.html -[3]: https://github.com/ansible/ansible -[4]: https://opensource.com/article/18/8/ansible-playbooks-you-should-try -[5]: https://github.com/openstack/ara -[6]: https://opensource.com/article/18/5/analyzing-ansible-runs-using-ara -[7]: https://github.com/cfengine/core -[8]: https://en.wikipedia.org/wiki/Promise_theory -[9]: https://github.com/chef/chef -[10]: https://docs.chef.io/chef_solo.html -[11]: https://github.com/puppetlabs/puppet -[12]: https://github.com/saltstack/salt -[13]: https://github.com/cncf/landscape diff --git a/translated/tech/20181212 Top 5 configuration management tools.md b/translated/tech/20181212 Top 5 configuration management tools.md new file mode 100644 index 0000000000..d618833492 --- /dev/null +++ b/translated/tech/20181212 Top 5 configuration management tools.md @@ -0,0 +1,120 @@ +[#]: collector: (lujun9972) +[#]: translator: (HankChow) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top 5 configuration management tools) +[#]: via: (https://opensource.com/article/18/12/configuration-management-tools) +[#]: author: (Marco Bravo https://opensource.com/users/marcobravo) + +五大最流行的配置管理工具 +====== +在寻找合适的 DevOps 工具之前,你最好要对配置管理工具有一定的了解。 +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M) + +DevOps 正因为有提高产品质量、缩短产品开发时间等优势,目前备受业界关注,同时也在长足发展当中。 + +[DevOps 的核心价值观][1]是团队文化Culture自动化Automation评估Measurement分享Sharing(CAMS),同时,团队对 DevOps 的执行力也是 DevOps 能否成功的重要因素。 + + * **团队文化**让大家团结一致; + * **自动化**是 DevOps 的基础; + * **评估**保证了及时的改进; + * **分享**让 CAMS 成为一个完整的循环过程。 + + + +DevOps 的另一个思想是任何东西,包括服务器、数据库、网络、日志文件、应用配置、文档、自动化测试、部署流程等,都可以通过代码来管理。 + +在本文中,我主要介绍配置管理的自动化。配置管理工具作为[基础架构即代码Infrastructure as Code][2](IaC)的一部分,支持使用软件进行开发实践,以及通过明文定义的文件来管理数据中心。 + +DevOps 团队只需要通过操作简单的配置文件,就可以实现应用开发中包括版本控制、测试、小型部署、设计模式这些最佳实践。总而言是,配置管理工具实现了通过编写代码来使基础架构管理变得自动化。 + +### 为什么要使用配置管理工具? + +配置管理工具可以提高应用部署和变更的效率,还可以让这些流程变得可重用、可扩展、可预测,甚至让它们维持在期望的状态,从而让资产的可控性提高。 + +使用配置管理工具的优势还包括: + + * 让代码遵守编码规范,提高代码可读性; + * 具有幂等性Idempotency,也就是说,无论执行多少次重复的配置管理操作,得到的结果都是一致的; + * 可以方便地管理分布式系统和大量的远程服务器。 + +配置管理工具主要分为拉取pull模式和推送push模式。拉取模式是指安装在各台服务器上的代理agent定期从中央存储库central repository拉取最新的配置并应用到对应的服务器上;而推送模式则由中央服务器central server主动向其它服务器推送更新的配置。 + +### 五大最流行的配置管理工具 + +目前配置管理工具有很多,不同的配置管理工具都有自己最适合的使用场景。而对于下面五个我按照字母顺序列出的配置管理工具,都对 DevOps 有明显的帮助:具有开源许可证、使用外部配置文件、支持无人值守运行、可以通过脚本自定义运行。下面对它们的介绍都来源于它们的软件库和官网内容。 + +#### Ansible + +“Ansible 是一个极其简洁的 IT 自动化平台,可以让你的应用和系统以更简单的方式部署。不需要安装任何代理,只需要使用 SSH 的方式和简单的语言,就可以免去脚本或代码部署应用的过程。”——[GitHub Ansible 代码库][3] + +Ansible 是我最喜欢的工具之一,我在几年前就开始使用了。你可以使用 Ansible 在命令行中让多个服务器执行同一个命令,也可以使用 YAML 格式的 playbook 来让它自动执行特定的操作,这让技术团队和非技术团队之间的沟通变得更加明确。简洁、无代理、配置文件对非技术人员友好是它的几个主要优点。 + +由于 Ansible 不需要代理,因此对服务器的资源消耗会很少。在默认情况下,Ansible 使用的推送模式需要借助 SSH 连接,但 Ansible 也支持拉取模式。[playbook][4] 可以使用最少的命令集编写,当然也可以扩展为更加精细的自动化任务,包括引入其它角色、变量和模块。 + +你可以将 Ansible 和其它工具(包括 Ansible Works、Jenkins、RunDeck、[ARA][5] 等)结合起来使用,因为这些工具支持 [playbook 的回溯功能][6],这样就可以很方便地控制整个开发周期中的不同流程。 + +### CFEngine + +“CFEngine 3 是一个流行的开源配置管理系统,它可以为大规模的系统提供自动化配置和维护。”——[GitHub CFEngine 代码库][7] + +CFEngine 最早在 1993 年由 Mark Burgess 以自动配置管理的科学方法提出,目的是降低计算机系统配置中的熵,最终收敛到期望的配置状态,同时还阐述了幂等性是让系统达到期望状态的能力。Burgess 在 2004 年又提出了承诺理论Promise Theory,这个理论描述了代理之间自发合作的模型。 + +CFEngine 的最新版本已经用到了承诺理论,在各个服务器上的代理程序会从中央存储库拉取配置。CFEngine 的配置对专业技能要求较高,因此它比较适合技术团队使用。 + +### Chef + +“为整个基础架构在配置管理上带来便利的一个系统集成框架。”——[GitHub Chef 代码库][9] + +Chef 通过由 Ruby 编写的“菜谱recipe”来让你的基础架构保持在最新、最兼容的状态,这些“菜谱”描述了一系列资源的某种状态。Chef 既可以通过客户端-服务端的模式运行,也可以在 [chef-solo][10] 这种独立配置的模式下运行。大部分云提供商都很好地集成了 Chef,因此可以使用它为新机器做自动配置。 + +Chef 有广泛的用户基础,同时也提供了完备的工具包,让不同技术背景的团队可以通过“菜谱”进行沟通。尽管如此,它仍然算是一个技术导向的工具。 + +### Puppet + +“Puppet 是可以在 Linux、Unix 和 Windows 系统上运行的自动化管理引擎,它可以根据集中的规范来执行诸如添加用户、安装软件包、更新服务器配置等等管理任务。”——[GitHub Puppet 代码库][11] + +Puppet 作为一款面向运维工程师和系统管理员的工具,在更多情况下是作为配置管理工具来使用。它通过客户端-服务端的模式工作,使用代理从主服务器获取配置指令。 + +Puppet 使用声明式语言declarative language或 Ruby 来描述系统配置。它包含了不同的模块,并使用清单文件manifest files记录期望达到的目标状态。Puppet 默认使用推送模式,但也支持拉取模式。 + +### Salt + +“为大规模基础结构或应用程序实现自动化管理的软件。”——[GitHub Salt 代码库][12] + +Salt 的专长就是快速收集数据,即使是上万台服务器也能够轻松完成任务。它使用 Python 模块来管理配置信息和执行特定的操作,这些模块可以让 Salt 实现所有远程操作和状态管理。但配置 Salt 模块对技术水平有一定的要求。 + +Salt 使用客户端-服务端的结构(Salt minions 是客户端,而 Salt master 是服务端),并以 Salt 状态文件记录需要达到的目标状态。 + +### 总结 + +DevOps 工具领域一直在发展,因此必须时刻关注其中的最新动态。希望这篇文章能够鼓励读者进一步探索相关的概念和工具。为此,云原生计算基金会Cloud Native Computing Foundation(CNCF)在 [Cloud Native Landscape Project][13] 中也提供了很好的参考案例。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/configuration-management-tools + +作者:[Marco Bravo][a] +选题:[lujun9972][b] +译者:[HankChow](https://github.com/HankChow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/marcobravo +[b]: https://github.com/lujun9972 +[1]: https://www.oreilly.com/learning/why-use-terraform +[2]: https://www.oreilly.com/library/view/infrastructure-as-code/9781491924334/ch04.html +[3]: https://github.com/ansible/ansible +[4]: https://opensource.com/article/18/8/ansible-playbooks-you-should-try +[5]: https://github.com/openstack/ara +[6]: https://opensource.com/article/18/5/analyzing-ansible-runs-using-ara +[7]: https://github.com/cfengine/core +[8]: https://en.wikipedia.org/wiki/Promise_theory +[9]: https://github.com/chef/chef +[10]: https://docs.chef.io/chef_solo.html +[11]: https://github.com/puppetlabs/puppet +[12]: https://github.com/saltstack/salt +[13]: https://github.com/cncf/landscape + From 76e0f3a6182312eac690a2a56684e39a28861518 Mon Sep 17 00:00:00 2001 From: XYenChi <466530436@qq.com> Date: Tue, 29 Jan 2019 23:56:09 +0800 Subject: [PATCH 079/164] Delete 20171222 10 keys to quick game development.md --- ...71222 10 keys to quick game development.md | 99 ------------------- 1 file changed, 99 deletions(-) delete mode 100644 sources/talk/20171222 10 keys to quick game development.md diff --git a/sources/talk/20171222 10 keys to quick game development.md b/sources/talk/20171222 10 keys to quick game development.md deleted file mode 100644 index 5897adaae8..0000000000 --- a/sources/talk/20171222 10 keys to quick game development.md +++ /dev/null @@ -1,99 +0,0 @@ -快速开发游戏的十个关键 -====== -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb) - -十月早些时候,Opensource.com赞助的 [Open Jam][1] 入职仪式为处于世界各地的团队设立了45个入口。这些队伍只有三天时间用开源软件制作出一个游戏来参与角逐,并 [取前三][2]。 - -我们在大学为每一位愿意参与的人举办了我们自己的 Open Jam 活动。周末预留了计算机实验室教大家使用开源软件——游戏引擎:[Godot][3],音乐:[LMMS][4] ,2D画面: [GIMP][5] 和3D画面 [Blender][6] ——来创作游戏和相关组件。活动产出了三个游戏: [Loathsome][7], [Lost Artist][8], 和 [Paint Rider][9] (我做的)。 - -总的说来,我从游戏创作和游戏开发中,学到了十课关于游戏引擎、代码和快速游戏开发。 - -## 1\. 限定规模 - -很容易想要去做一个规模宏大的冒险游戏或者比拟你最喜欢的游戏的东西。追求高于游戏创作之外的东西可能很酷,如果你有体会,但不要高估自己拥有的时间。我欣赏游戏创作的一点是强制你快速将一个游戏从概念阶段变成最终产品,因为你的时间非常有限。这也就是限定规模如此重要。 - -Open Jam 的主题是“留下痕迹”,题目一出来,我和朋友就开始讨论什么样的游戏合题意。有个想法就是做玩家能在敌人身上留下伤痕的3D拳击游戏。我几乎没有做3D游戏的经验,我想做好的话,在我甚至还没发掘出可玩性之前,就得花太多时间在学习如何让痕迹合理和打击有效。 - -## 2\. 尽早可玩 - -对游戏创作我最中肯的建议就是这。试着做出核心部件,快速写出代码,这样你就可以测试并决定它是否值得做成一个完整的游戏。不应该只剩几个小时截止了,才让你的游戏可玩。像 Open Jam 这样的三天创作,最好少花时间在实现概念上。 - -## 3\. 保持简单 - -你想加入的每个特性都会延长整个开发时间。因为你不能迅速使之运行,所以无从得知提交一个新特性是否会消耗大量时间。街机风格的高分作品往往会在游戏创作中表现良好,它们天生就很简单。一旦核心部分完成,你可以开始加入特性并润色,无需担心最后游戏是否功能强大。 - -## 4\. 从其他游戏获取灵感 - -可能你想做出完全原创的作品,但作品的原型极其有用。原型将节省重复劳动的时间,因为你已经知道什么有趣。告诉自己实践的经验越多,越容易做出包含自己想法的大型游戏,自然你也能从再创作其他人的作品中很好地练习。 - -考虑到 Open Jam 的“留下痕迹”主题,我觉得创作一个玩的时候可以留下颜料痕迹的游戏会很有趣,这样也可以看到你留下的标记。我记得这款老式动画游戏 [Line Rider 2 Beta][10] (后来叫 Paint Rider),而且知道玩的时候按住 Control 键可以画出痕迹的彩蛋。我简化了概念,甚至只需要一个按键来垂直移动。(更像老式飞机游戏)。大概一两个小时的创作,我有了基本模型,用一个按钮上下移动和留下小黑圈的痕迹。 - -## 5\. 不要忽视可得性 - -确保尽可能多的人能玩你的游戏。某个提交到 Open Jam 的游戏是虚拟现实游戏。尽管那很酷,但几乎没有人可以玩,因为拥有VR设备的人不多。所幸它的开发者并不期望取得好名次,只是想练手。但如果你想和人们分享你的游戏(或者赢得游戏创作),注意可得性是很重要的。 - -Godot (和其他大多数游戏引擎)允许你在所有主流平台发布游戏。提交游戏时,特别是在 [Itch.io][11],有浏览器版本将支持大多数人玩。但尽你所能去发布在更多的平台和开放系统上。我甚至试着在移动端发布 Paint Rider ,但技术有限。 - -## 6\. 不要做得太难 - -如果游戏需要花费过多精力去学或者玩,你将失去一部分玩家。这照应了保持简单和限定规模,在游戏计划阶段非常重要。再次重申,想做一个宏大的游戏花上十天半个月开发很容易;难的是做出好玩、简单的游戏。 - -给妈妈介绍了 Paint Rider 之后,她很快开始玩起来,我认为不需要跟她说明更多。 - -## 7\. 不用太整洁 - -如果你习惯于花时间在设计每处图案和确保代码可复用、可适应,试着放松一点。如果你花太多时间考虑设计,当你最后到了可以玩游戏的时候,你可能发现游戏不是很有趣,那时候就来不及修改了。 - -这过程也适用于简化更严格的游戏:快速码出验证概念性展示模型直到找出值得做成完整游戏的,然后你潜心建立完美的代码基础来支持它。游戏创作的开发游戏就像快速码出可验证的理念。 - -## 8\. 但也不要太随意 - -另一方面, [意大利面式代码][12] 容易失控,即使游戏开发没有大量代码。还好大多是游戏引擎用脑中的设计图建成。Luckily, most game engines are built with design patterns in mind. 就拿 Godot 的[信号][13] 功能来说,节点可以发送数据信息给它们“连上了”的节点——这是你的设计自动成型的[观测图][14]。 只要你知道如何利用游戏引擎的特性,就可以快速写代码,你的代码也不会特别难读。 - -## 9\. 取得反馈 - -向人们展示你正在做的。让他们试一试并看看他们说些啥。看看他们如何玩你的游戏,找找他们有没有发现你期望之外的事。如果游戏创作有[争论][15] 频道或者类似的,把你的游戏放上去,人们会反馈你的想法。 Paint Rider 的定义功能之一是画布循环,所以你可以看到之前留下来的画。在有人问我为什么这个游戏没有之前,我甚至没有考虑那个设置。 - -团队协作的话,确保有其他可以传递周围反馈的人参与这个开发。 - -而且不要忘了用相同的方式帮助其他人;如果你在玩其他人游戏的时候发现了有助于你游戏的东西,这就是双赢。 - -## 10\. 哪里找资源 - -做出所有你自己的组件真的会拖你后腿。 Open Jam 期间,当我忙于组装新特性和修漏洞时,我注意到 Loathsome 的开发者花了大量时间在绘制主要角色 developer was spending multiple hours drawing the main character while I was busy incorporating new features and fixing bugs. 你可以简化游戏的艺术风格创作并且用一些视听效果尚可的东西,这里有其他选择。试着在 [Creative Commons][16] 上寻找组件或者免费音乐站点,比如 [Anttis Instrumentals][17] 。或者,可行的话,组一个有专门艺术家、作家或者音乐家的团队。 - -其他你可能觉得有用的软件有 [Krita][18] ,一款适合数字绘画的开源 2D 图像生成软件,特别是如果你有一块绘图板,还有 [sfxr][19] ,一款游戏音效生成软件,很多参数可以调,但正如它的开发者所说:“基本用法包括了按下随机按钮。”( Paint Rider 的所有音效都是用 Sfxr 做的。)你也可以试试 [Calinou][20] 的众多但有序的开源游戏开发软件列表。 - -你参加 Open Jam 或者其他游戏创作并有别的建议吗?对我未提及的有问题吗?有的话,请在评论中分享。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/17/12/10-keys-rapid-open-source-game-development - -作者:[Ryan Estes][a] -译者:[XYenChi](https://github.com/XYenChi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/figytuna -[1]:https://itch.io/jam/open-jam-1 -[2]:https://opensource.com/article/17/11/open-jam -[3]:https://godotengine.org/ -[4]:https://lmms.io/ -[5]:https://www.gimp.org/ -[6]:https://www.blender.org/ -[7]:https://astropippin.itch.io/loathsome -[8]:https://masonraus.itch.io/lost-artist -[9]:https://figytuna.itch.io/paint-rider -[10]:http://www.andkon.com/arcade/racing/lineriderbeta2/ -[11]:https://itch.io/ -[12]:https://en.wikipedia.org/wiki/Spaghetti_code -[13]:http://kidscancode.org/blog/2017/03/godot_101_07/ -[14]:https://en.wikipedia.org/wiki/Observer_pattern -[15]:https://discordapp.com/ -[16]:https://creativecommons.org/ -[17]:http://www.soundclick.com/bands/default.cfm?bandID=1277008 -[18]:https://krita.org/en/ -[19]:http://www.drpetter.se/project_sfxr.html -[20]:https://notabug.org/Calinou/awesome-gamedev/src/master/README.md From 8d1305203ca28ec1234a1fcc9f308d4e35f4c6bf Mon Sep 17 00:00:00 2001 From: MjSeven Date: Wed, 30 Jan 2019 00:09:52 +0800 Subject: [PATCH 080/164] Translating by MjSeven --- ... Plan your own holiday calendar at the Linux command line.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md b/sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md index b4d6f58b32..9188914bbb 100644 --- a/sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md +++ b/sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 538c7b4a3e348548e3bffab157585010a2ba8eeb Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 30 Jan 2019 08:54:24 +0800 Subject: [PATCH 081/164] translated --- ... And Hardware Monitoring Tool For Linux.md | 139 ------------------ 1 file changed, 139 deletions(-) delete mode 100644 sources/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md diff --git a/sources/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md b/sources/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md deleted file mode 100644 index 24b5f93af7..0000000000 --- a/sources/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Hegemon – A Modular System And Hardware Monitoring Tool For Linux) -[#]: via: (https://www.2daygeek.com/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -Hegemon – A Modular System And Hardware Monitoring Tool For Linux -====== - -I know that everybody is preferring for **[TOP Command][1]** to monitor system utilization. - -It’s one of the best and native command which used by vast of Linux administrators. - -In Linux there is an alternative for everything respective of packages. - -There are many utilities are available for this purpose in Linux and i prefer **[HTOP Command][2]**. - -If you want to know about other alternatives, i would suggest you to navigate to the each link to know more about it. - -Those are htop, CorFreq, glances, atop, Dstat, Gtop, Linux Dash, Netdata, Monit, etc. - -All these tools only allow us to monitor system utilization and not for the system hardware’s. - -But Hegemon is allow us to monitor both in the single dashboard. - -If you are looking for system hardware monitoring then i would suggest you to check **[lm_sensors][3]** and **[s-tui Stress Terminal UI][4]** utilities. - -### What’s Hegemon? - -Hegemon is a work-in-progress modular system monitor written in safe Rust. - -It allow users to monitor both utilization in a single dashboard. It’s system utilization and hardware temperatures. - -### Currently Available Features in Hegemon - - * Monitor CPU and memory usage, temperatures, and fan speeds - * Expand any data stream to reveal a more detailed graph and additional information - * Adjustable update interval - * Clean MVC architecture with good code quality - * Unit tests - - - -### Planned Features include - - * macOS and BSD support (only Linux is supported at the moment) - * Monitor disk and network I/O, GPU usage (maybe), and more - * Select and reorder data streams - * Mouse control - - - -### How to Install Hegemon in Linux? - -Hegemon is requires Rust 1.26 or later and the development files for libsensors. So, make sure these packages were installed before your perform Hegemon installation. - -libsensors library package is available in most of the distribution official repository so, use the following command to install it. - -For **`Debian/Ubuntu`** systems, use **[APT-GET Command][5]** or **[APT Command][6]** to install libsensors on your systems. - -``` -# apt install lm_sensors-devel -``` - -For **`Fedora`** system, use **[DNF Package Manager][7]** to install libsensors on your system. - -``` -# dnf install libsensors4-dev -``` - -Run the following command to install Rust programming language and follow the instruction. Navigate to the following URL if you want handy tutorials for **[Rust installation][8]**. - -``` -$ curl https://sh.rustup.rs -sSf | sh -``` - -If you have successfully installed Rust. Run the following command to install Hegemon. - -``` -$ cargo install hegemon -``` - -### How to Lunch Hegemon in Linux? - -Once you successfully install Hegemon package. Run run the below command to launch it. - -``` -$ hegemon -``` - -![][10] - -I was facing an issue when i was launching the “Hegemon” application due to libsensors.so.4 libraries issue. - -``` -$ hegemon -error while loading shared libraries: libsensors.so.4: cannot open shared object file: No such file or directory manjaro -``` - -I’m using Manjaro 18.04. It has the libsensors.so & libsensors.so.5 shared libraries and not for libsensors.so.4. So, i just created the following symlink to fix the issue. - -``` -$ sudo ln -s /usr/lib/libsensors.so /usr/lib/libsensors.so.4 -``` - -Here is the sample gif file which was taken from my Lenovo-Y700 laptop. -![][11] - -By default it shows only overall summary and if you would like to see the detailed output then you need to expand the each section. See the expanded output with Hegemon. -![][12] - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/top-command-examples-to-monitor-server-performance/ -[2]: https://www.2daygeek.com/linux-htop-command-linux-system-performance-resource-monitoring-tool/ -[3]: https://www.2daygeek.com/view-check-cpu-hard-disk-temperature-linux/ -[4]: https://www.2daygeek.com/s-tui-stress-terminal-ui-monitor-linux-cpu-temperature-frequency/ -[5]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ -[6]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ -[7]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/ -[8]: https://www.2daygeek.com/how-to-install-rust-programming-language-in-linux/ -[9]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[10]: https://www.2daygeek.com/wp-content/uploads/2019/01/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux-1.png -[11]: https://www.2daygeek.com/wp-content/uploads/2019/01/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux-2a.gif -[12]: https://www.2daygeek.com/wp-content/uploads/2019/01/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux-3.png From defbf592185ad54c5df00614109de4b448c3be72 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 30 Jan 2019 09:14:39 +0800 Subject: [PATCH 082/164] translated --- ... And Hardware Monitoring Tool For Linux.md | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 translated/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md diff --git a/translated/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md b/translated/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md new file mode 100644 index 0000000000..9dd255cb67 --- /dev/null +++ b/translated/tech/20190114 Hegemon - A Modular System And Hardware Monitoring Tool For Linux.md @@ -0,0 +1,139 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Hegemon – A Modular System And Hardware Monitoring Tool For Linux) +[#]: via: (https://www.2daygeek.com/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Hegemon - 一个 Linux 中的模块化系统和硬件监控工具 +====== + +我知道每个人都更喜欢使用 **[top 命令][1]**来监控系统利用率。 + +这是被 Linux 系统管理员大量使用的原生命令之一。 + +在 Linux 中,每个包都有一个替代品。 + +Linux 中有许多可用于此的工具,我更喜欢 **[htop 命令][2]**。 + +如果你想了解其他替代方案,我建议你浏览每个链接了解更多信息。 + +它们有 htop、CorFreq、glances、atop、Dstat、Gtop、Linux Dash、Netdata、Monit 等。 + +所有这些只允许我们监控系统利用率而不能监控系统硬件。 + +但是 Hegemon 允许我们在单个仪表板中监控两者。 + +如果你正在寻找系统硬件监控软件,那么我建议你看下 **[lm_sensors][3]** 和 **[s-tui 压力终端 UI][4]**。 + +### Hegemon 是什么? + +Hegemon 是一个正在开发中的模块化系统监视器, 以安全的 Rust 编写。 + +它允许用户在单个仪表板中监控两种使用情况。分别是系统利用率和硬件温度。 + +### Hegemon 目前的特性 + + * 监控 CPU 和内存使用情况、温度和风扇速度 +  * 展开任何数据流以显示更详细的图表和其他信息 +  * 可调整的更新间隔 +  * 干净的 MVC 架构,具有良好的代码质量 +  * 单元测试 + + + +### 计划的特性包括 + + * macOS 和 BSD 支持(目前仅支持 Linux) +  * 监控磁盘和网络 I/O、GPU使用情况(可能)等 +  * 选择并重新排序数据流 +  * 鼠标控制 + + + +### 如何在 Linux 中安装 Hegemon? + +Hegemon 需要 Rust 1.26 或更高版本以及 libsensors 的开发文件。因此,请确保在安装 Hegemon 之前安装了这些软件包。 + +libsensors 库在大多数发行版官方仓库中都有,因此,使用以下命令进行安装。 + +对于 **`Debian/Ubuntu`** 系统,使用 **[apt-get 命令][5]** 或 **[apt 命令][6]** 在你的系统上安装 libsensors。 + +``` +# apt install lm_sensors-devel +``` + +对于 **`Fedora`** 系统,使用 **[dnf 包管理器][7]**在你的系统上安装 libsensors。 + +``` +# dnf install libsensors4-dev +``` + +运行以下命令安装 Rust 语言,并按照指示来做。如果你想要看 **[Rust 安装][8]**的方便教程,请进入这个 URL。 + +``` +$ curl https://sh.rustup.rs -sSf | sh +``` + +如果你已成功安装 Rust。运行以下命令安装 Hegemon。 + +``` +$ cargo install hegemon +``` + +### 如何在 Linux 中启动 Hegemon? + +成功安装 Hegemon 包后,运行下面的命令启动。 + +``` +$ hegemon +``` + +![][10] + +由于 libsensors.so.4 库的问题,我在启动 “Hegemon” 时遇到了一个问题。 + +``` +$ hegemon +error while loading shared libraries: libsensors.so.4: cannot open shared object file: No such file or directory manjaro +``` + +我使用的是 Manjaro 18.04。它存在 libsensors.so 和 libsensors.so.5 共享库,而没有 libsensors.so.4。所以,我刚刚创建了以下符号链接来解决问题。 + +``` +$ sudo ln -s /usr/lib/libsensors.so /usr/lib/libsensors.so.4 +``` + +这是从我的 Lenovo-Y700 笔记本中截取的示例 gif。 +![][11] + +默认它仅显示总体摘要,如果你想查看详细输出,则需要展开每个部分。使用 Hegemon 查看展开内容。 +![][12] + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/top-command-examples-to-monitor-server-performance/ +[2]: https://www.2daygeek.com/linux-htop-command-linux-system-performance-resource-monitoring-tool/ +[3]: https://www.2daygeek.com/view-check-cpu-hard-disk-temperature-linux/ +[4]: https://www.2daygeek.com/s-tui-stress-terminal-ui-monitor-linux-cpu-temperature-frequency/ +[5]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/ +[6]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/ +[7]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/ +[8]: https://www.2daygeek.com/how-to-install-rust-programming-language-in-linux/ +[9]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[10]: https://www.2daygeek.com/wp-content/uploads/2019/01/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux-1.png +[11]: https://www.2daygeek.com/wp-content/uploads/2019/01/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux-2a.gif +[12]: https://www.2daygeek.com/wp-content/uploads/2019/01/hegemon-a-modular-system-and-hardware-monitoring-tool-for-linux-3.png From 13b6b3f25df10c44bc5dcc8b8ec61fa76dead1c5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 30 Jan 2019 09:20:35 +0800 Subject: [PATCH 083/164] translating --- ...Tron-influenced terminal program for tablets and desktops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md b/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md index f181f4ebd1..78f31a6b94 100644 --- a/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md +++ b/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 00deeb2367d702173592d8a3df52d041e08e203e Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Wed, 30 Jan 2019 09:29:55 +0800 Subject: [PATCH 084/164] hankchow translating --- sources/tech/20190124 Understanding Angle Brackets in Bash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190124 Understanding Angle Brackets in Bash.md b/sources/tech/20190124 Understanding Angle Brackets in Bash.md index bd9a3782fb..063eec3fd0 100644 --- a/sources/tech/20190124 Understanding Angle Brackets in Bash.md +++ b/sources/tech/20190124 Understanding Angle Brackets in Bash.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (HankChow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2927c795f9226ceafc7b057b660145eda2a63416 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Wed, 30 Jan 2019 13:38:25 +0800 Subject: [PATCH 085/164] Translating An Introduction to Go. --- translated/tech/20181224 An Introduction to Go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index 0e4b77aadc..a9f50f6770 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -239,7 +239,7 @@ slice2 := array[:] // 整个数组的切片 slice3 := array[1:] // 除了首元素的切片 ``` -There are some more possible combinations for the slicing operator than mentioned above, but this should give a good first impression. +除了上述例子,还有更多可行的切片运算组合,但需要明了直观。 使用 `append()` 函数,切片可以作为一个变长数组使用。 @@ -248,7 +248,7 @@ slice = append(slice, value1, value2) slice = append(slice, arrayOrSlice...) ``` -Slices are also used internally to represent variable parameters in variable length functions. +切片也可以用于函数的变长参数。 ### Maps From 0727e429656262101a842cfddcd00cf4fb80c16c Mon Sep 17 00:00:00 2001 From: dianbanjiu Date: Wed, 30 Jan 2019 15:01:30 +0800 Subject: [PATCH 086/164] translated --- ...u monitor activity on your Linux server.md | 156 ----------------- ...u monitor activity on your Linux server.md | 157 ++++++++++++++++++ 2 files changed, 157 insertions(+), 156 deletions(-) delete mode 100644 sources/tech/20190123 Commands to help you monitor activity on your Linux server.md create mode 100644 translated/tech/20190123 Commands to help you monitor activity on your Linux server.md diff --git a/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md b/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md deleted file mode 100644 index c2a95d7ec2..0000000000 --- a/sources/tech/20190123 Commands to help you monitor activity on your Linux server.md +++ /dev/null @@ -1,156 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (dianbanjiu ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Commands to help you monitor activity on your Linux server) -[#]: via: (https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Commands to help you monitor activity on your Linux server -====== -The watch, top, and ac commands provide some effective ways to oversee what is happening on your Linux servers. - -![](https://images.idgesg.net/images/article/2019/01/owl-face-100785829-large.jpg) - -Linux systems provide a number of commands that make it easy to report on system activity. In this post, we're going to look at several commands that are especially helpful. - -### The watch command - -The **watch** command is one that makes it easy to repeatedly examine a variety of data on your system — user activities, running processes, logins, memory usage, etc. All the command really does is run the command that you specify repeatedly, each time overwriting the previously displayed output, but this lends itself to a very convenient way of monitoring what's happening on your system. - -To start with a very basic and not particularly useful command, you could run **watch -n 5 date** and see a display with the current date and time that updates every 5 seconds. As you likely have guessed, the **-n 5** option specifies the number of seconds to wait between each run of the command. The default is 2 seconds. The command will run and update a display like this until you stop it with a ^c. - -``` -Every 5.0s: date butterfly: Wed Jan 23 15:59:14 2019 - -Wed Jan 23 15:59:14 EST 2019 -``` - -As a more interesting command example, you can watch an updated list of whoever is logging into the server. As written, this command will update every 10 seconds. Users who log out will disappear from the current display and those who log in will come into view. If no one is logging in or out, the display will remain the same except for the time displayed. - -``` -$ watch -n 10 who - -Every 10.0s: who butterfly: Tue Jan 23 16:02:03 2019 - -shs :0 2019-01-23 09:45 (:0) -dory pts/0 2019-01-23 15:50 (192.168.0.5) -nemo pts/1 2019-01-23 16:01 (192.168.0.15) -shark pts/3 2019-01-23 11:11 (192.168.0.27) -``` - -If you just want to see how many users are logged in, you can get a user count along with load averages showing you how hard the system is working by having watch call the **uptime** command. - -``` -$ watch uptime - -Every 2.0s: uptime butterfly: Tue Jan 23 16:25:48 2019 - - 16:25:48 up 22 days, 4:38, 3 users, load average: 1.15, 0.89, 1.02 -``` - -If you want to use watch to repeat a command that includes a pipe, you need to put the command between quote marks like this command that every 5 seconds shows you how many processes are running: - -``` -$ watch -n 5 'ps -ef | wc -l' - -Every 5.0s: ps -ef | wc -l butterfly: Tue Jan 23 16:11:54 2019 - -245 -``` - -To watch memory usage, you might try a command like this one: - -``` -$ watch -n 5 free -m - -Every 5.0s: free -m butterfly: Tue Jan 23 16:34:09 2019 - - total used free shared buff/cache available -Mem: 5959 776 3276 12 1906 4878 -Swap: 2047 0 2047 -``` - -You could watch processes being run by one particular user with **watch,** but the **top** command provides a much better option. - -### The top command - -If you want to watch one particular user's processes, top has an ideal option for you — the -u option: - -``` -$ top -u nemo -top - 16:14:33 up 2 days, 4:27, 3 users, load average: 0.00, 0.01, 0.02 -Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie -%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st -MiB Mem : 5959.4 total, 3277.3 free, 776.4 used, 1905.8 buff/cache -MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 4878.4 avail Mem - - PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND -23026 nemo 20 0 46340 7820 6504 S 0.0 0.1 0:00.05 systemd -23033 nemo 20 0 149660 3140 72 S 0.0 0.1 0:00.00 (sd-pam) -23125 nemo 20 0 63396 5100 4092 S 0.0 0.1 0:00.00 sshd -23128 nemo 20 0 16836 5636 4284 S 0.0 0.1 0:00.03 zsh -``` - -You not only see what processes the user is running, but the resources (CPU time and memory) that the process is consuming and how hard the system is working overall. - -### The ac command - -If you'd like to see how much time each of your users is spending logged in, you can make use of the **ac** command. This requires installation of the **acct** (Debian) or **psacct** (RHEL, Centos, etc.) package. - -The **ac** command has a number of options, but it pulls its data from the current **wtmp** file. Here's an example showing the total number of hours users were logged in recently: - -``` -$ ac - total 1261.72 -``` - -This command shows total hours by user: - -``` -$ ac -p - shark 5.24 - nemo 5.52 - shs 1251.00 - total 1261.76 -``` - -This ac command shows daily counts of how many hours users were logged in: - -``` -$ ac -d | tail -10 - -Jan 11 total 0.05 -Jan 12 total 1.36 -Jan 13 total 16.39 -Jan 15 total 55.33 -Jan 16 total 38.02 -Jan 17 total 28.51 -Jan 19 total 48.66 -Jan 20 total 1.37 -Jan 22 total 23.48 -Today total 9.83 -``` - -### Wrap-up - -There are many commands for examining system activity. The **watch** command allows you to run just about any command in a repetitive way and watch how the output changes. The **top** command is a better option for focusing on user processes and also loops in a way that allows you to see the changes as they happen, while the **ac** command examines user connect time. - -Join the Network World communities on [Facebook][1] and [LinkedIn][2] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.facebook.com/NetworkWorld/ -[2]: https://www.linkedin.com/company/network-world diff --git a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md b/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md new file mode 100644 index 0000000000..3c0e44a946 --- /dev/null +++ b/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md @@ -0,0 +1,157 @@ +[#]: collector: (lujun9972) +[#]: translator: (dianbanjiu ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Commands to help you monitor activity on your Linux server) +[#]: via: (https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +帮你监控你的 Linux 服务器的命令 +====== + +watch、top 和 ac 命令为我们监视 Linux 服务器上的活动提供了一些十分高效的途径。 + +![](https://images.idgesg.net/images/article/2019/01/owl-face-100785829-large.jpg) + +为了在获取系统活动时更加轻松,Linux 系统提供了一系列相关的命令。在这篇文章中,我们就一起来看看这些对我们很有帮助的命令吧。 + +### watch 命令 + +**watch** 是一个使得重复检测 Linux 系统中一系列数据,例如用户活动、正在运行进程、登录、内存使用等更加容易的命令。这个命令实际上是重复地运行一个特定的命令,每次都会重写之前显示的输出,它提供了一个比较方便的方式用以监测在你的系统中发生的活动。 + +首先以一个基础且不是特别有用的命令开始,你可以运行 `watch -n 5 date`,然后你可以看到在终端中显示了当前的日期和时间,这些数据会每五秒更新一次。你可能已经猜到了,**-n 5** 选项指定了运行接下来一次命令需要等待的秒数。默认是 2 秒。这个命令将会一直运行并按照指定的时间更新显示,直到你使用 ^C 停下它。 + +``` +Every 5.0s: date butterfly: Wed Jan 23 15:59:14 2019 + +Wed Jan 23 15:59:14 EST 2019 +``` + +下面是一个很有趣的命令实例,你可以监控一个在服务器中登录用户的列表,该列表会按照指定的时间定时更新。就像下面写到的,这个命令会每 10 秒更新一次这个列表。登出的用户将会从当前显示的列表中消失,那些新登录的将会被添加到这个表格当中。如果没有用户再登录或者登出,这个表格跟之前显示的将不会有任何不同。 + +``` +$ watch -n 10 who + +Every 10.0s: who butterfly: Tue Jan 23 16:02:03 2019 + +shs :0 2019-01-23 09:45 (:0) +dory pts/0 2019-01-23 15:50 (192.168.0.5) +nemo pts/1 2019-01-23 16:01 (192.168.0.15) +shark pts/3 2019-01-23 11:11 (192.168.0.27) +``` + +如果你只是想看有多少用户登录过,可以通过 watch 调用 **uptime** 命令获取用户数和负载的平均水平,以及系统的工作状况。 + +``` +$ watch uptime + +Every 2.0s: uptime butterfly: Tue Jan 23 16:25:48 2019 + + 16:25:48 up 22 days, 4:38, 3 users, load average: 1.15, 0.89, 1.02 +``` + +如果你想使用 watch 重复一个包含了管道的命令,就需要将该命令用引号括起来,就比如下面这个每五秒显示一次有多少进程正在运行的命令。 + +``` +$ watch -n 5 'ps -ef | wc -l' + +Every 5.0s: ps -ef | wc -l butterfly: Tue Jan 23 16:11:54 2019 + +245 +``` + +要查看内存使用,你也许会想要试一下下面的这个命令组合: + +``` +$ watch -n 5 free -m + +Every 5.0s: free -m butterfly: Tue Jan 23 16:34:09 2019 + + total used free shared buff/cache available +Mem: 5959 776 3276 12 1906 4878 +Swap: 2047 0 2047 +``` + +你可以在 **watch** 后添加一些选项查看某个特定用户下运行的进程,不过 **top** 为此提供了更好的选择。 + +### top 命令 + +如果你想查看某个特定用户下的进程,top 命令的 `-u` 选项可以很轻松地帮你达到这个目的。 + +``` +$ top -u nemo +top - 16:14:33 up 2 days, 4:27, 3 users, load average: 0.00, 0.01, 0.02 +Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie +%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st +MiB Mem : 5959.4 total, 3277.3 free, 776.4 used, 1905.8 buff/cache +MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 4878.4 avail Mem + + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND +23026 nemo 20 0 46340 7820 6504 S 0.0 0.1 0:00.05 systemd +23033 nemo 20 0 149660 3140 72 S 0.0 0.1 0:00.00 (sd-pam) +23125 nemo 20 0 63396 5100 4092 S 0.0 0.1 0:00.00 sshd +23128 nemo 20 0 16836 5636 4284 S 0.0 0.1 0:00.03 zsh +``` + +你可能不仅可以看到某个用户下的进程,还可以查看每个进程所占用的资源,以及系统总的工作状况。 + +### ac 命令 + +如果你想查看系统中每个用户登录的时长,可以使用 **ac** 命令。运行该命令之前首先需要安装 **acct**(Debian 等) 或者 **psacct**(RHEL、Centos 等) 包。 + +**ac** 命令有一系列的选项,该命令从 **wtmp** 文件中拉取数据。这个例子展示的是最近用户登录的总小时数。 + +``` +$ ac + total 1261.72 +``` + +这个命令显示了用户登录的总的小时数: + +``` +$ ac -p + shark 5.24 + nemo 5.52 + shs 1251.00 + total 1261.76 +``` + +这个命令显示了用户每天登录的小时数: + +``` +$ ac -d | tail -10 + +Jan 11 total 0.05 +Jan 12 total 1.36 +Jan 13 total 16.39 +Jan 15 total 55.33 +Jan 16 total 38.02 +Jan 17 total 28.51 +Jan 19 total 48.66 +Jan 20 total 1.37 +Jan 22 total 23.48 +Today total 9.83 +``` + +### 总结 + +Linux 系统上有很多命令可以用于检查系统活动。**watch** 命令允许你以重复的方式运行任何命令,并观察输出有何变化。**top** 命令是一个专注于用户进程的最佳选项,以及允许你以动态方式查看进程的变化,还可以使用 **ac** 命令检查用户连接到系统的时间。 + +加入 [Facebook][1] 和 [LinkedIn][2] 上的 Network World 社区,来交流更多有用的主题。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html + +作者:[Sandra Henry-Stocker][a] +选题:[lujun9972][b] +译者:[dianbanjiu](https://github.com/dianbanjiu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.facebook.com/NetworkWorld/ +[2]: https://www.linkedin.com/company/network-world From fafa7cf025301f5bcae7cc5a38dc6399a597a06c Mon Sep 17 00:00:00 2001 From: dianbanjiu Date: Wed, 30 Jan 2019 15:07:14 +0800 Subject: [PATCH 087/164] translated --- ...ommands to help you monitor activity on your Linux server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md b/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md index 3c0e44a946..394b553d13 100644 --- a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md +++ b/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md @@ -7,7 +7,7 @@ [#]: via: (https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) -帮你监控你的 Linux 服务器的命令 +监控 Linux 服务器的几个常用命令 ====== watch、top 和 ac 命令为我们监视 Linux 服务器上的活动提供了一些十分高效的途径。 From d83e4d3970e055a7b2cf4ed555b90280c476863f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 17:51:37 +0800 Subject: [PATCH 088/164] PRF:20181219 How to open source your Python library.md @geekpi --- ... How to open source your Python library.md | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/translated/tech/20181219 How to open source your Python library.md b/translated/tech/20181219 How to open source your Python library.md index 7c4a2d3f25..8569db33c1 100644 --- a/translated/tech/20181219 How to open source your Python library.md +++ b/translated/tech/20181219 How to open source your Python library.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to open source your Python library) @@ -9,45 +9,44 @@ 如何开源你的 Python 库 ====== -这 12 个步骤能确保成功发布。 + +> 这 12 个步骤能确保成功发布。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx) -你写了一个 Python 库。我觉着这太棒了!如果让人们能够轻松使用它不是很优雅么?这有一个需要考虑的清单,以及在开源 Python 库时要采取的具体步骤。 +你写了一个 Python 库。自己觉着这太棒了!如果让人们能够轻松使用它不是很优雅么?这有一个需要考虑的清单,以及在开源 Python 库时要采取的具体步骤。 -### 1\. 源码 +### 1、源码 将代码放在 [GitHub][1] 上,这里有很多开源项目,并且人们很容易提交拉取请求。 -### 2\. 许可证 - -选择一个开源许可证。默认的一个不错的,宽容的是 [MIT 许可][2]。如果你有特定要求,Creative Common 的[选择许可][3]可以指导你完成其他选择。最重要的是,在选择许可时要记住三条规则: +### 2、许可证 +选择一个开源许可证。一般来说 [MIT 许可证][2]是一个挺好的宽容许可证。如果你有特定要求,Creative Common 的[选择许可证][3]可以指导你完成其它选择。最重要的是,在选择许可证时要记住三条规则: * 不要创建自己的许可证。 * 不要创建自己的许可证。 * 不要创建自己的许可证。 +### 3、README - -### 3\. README - -将一个名为 README.rst 的文件(使用 ReStructured Text 格式化)放在项目树的顶层。 +将一个名为 `README.rst` 的文件(使用 ReStructured Text 格式化)放在项目树的顶层。 GitHub 将像 Markdown 一样渲染 ReStructured Text,而 ReST 在 Python 的文档生态系统中的表现更好。 -### 4\. 测试 +### 4、测试 写测试。这对你来说没有用处。但对于想要编写避免破坏相关功能的补丁的人来说,它非常有用。 测试可帮助协作者进行协作。 -通常情况下,如果可以用 [**pytest**][4] 运行就最好了。还有其他测试工具 - 但很少有理由去使用它们。 +通常情况下,如果可以用 [pytest][4] 运行就最好了。还有其他测试工具 —— 但很少有理由去使用它们。 -### 5\. 样式 +### 5、样式 -使用 linter 制定样式:PyLint、Flake8 或者带上 **\--check** 的 Black 。除非你使用Black,否则请确保在下载源代码文件中指定配置选项。 +使用 linter 制定样式:PyLint、Flake8 或者带上 `--check` 的 Black 。除非你使用 Black,否则请确保在一个文件中指定配置选项,并签入到版本控制系统中。 -### 6\. API 文档 +### 6、API 文档 使用 docstrings 来记录模块、函数、类和方法。 @@ -55,33 +54,33 @@ GitHub 将像 Markdown 一样渲染 ReStructured Text,而 ReST 在 Python 的 Sphinx 可以同时处理 Google 风格和 ReST 的 docstrings,以将零散的文档集成为 API 文档。 -### 7\. 零散文档 +### 7、零散文档 使用 [Sphinx][7]。(阅读[我们这篇文章][8]。)教程很有用,但同样重要的是要指明这是什么、它有什么好处、它有什么坏处、以及任何特殊的考虑因素。 -### 8\. 构建 +### 8、构建 -使用 **tox** 或 **nox** 自动运行测试、linter 并构建文档。这些工具支持“依赖矩阵”。这些矩阵往往会快速增长,但你可以尝试针对合理的样本进行测试,例如 Python 版本、依赖项版本以及可能安装的可选依赖项。 +使用 tox 或 nox 自动运行测试和 linter,并构建文档。这些工具支持“依赖矩阵”。这些矩阵往往会快速增长,但你可以尝试针对合理的样本进行测试,例如 Python 版本、依赖项版本以及可能安装的可选依赖项。 -### 9\. 打包 +### 9、打包 -使用 [setuptools][9] 工具。写一个 **setup.py** 和一个 **setup.cfg**。如果同时支持 Python 2 和 3,请在 **setup.cfg** 中指定 universal wheel。 +使用 [setuptools][9] 工具。写一个 `setup.py` 和一个 `setup.cfg`。如果同时支持 Python 2 和 3,请在 `setup.cfg` 中指定 universal 格式的 wheel。 -**tox** 或 **nox** 应该做的一件事是构建 wheel 并对已安装的 wheel 进行测试。 +tox 或 nox 应该做的一件事是构建 wheel 并对已安装的 wheel 进行测试。 避免使用 C 扩展。如果出于性能或绑定的原因一定需要它们,请将它们放在单独的包中。正确打包 C 扩展可以写一篇新的文章。这里有很多问题! -### 10\. 持续集成 +### 10、持续集成 -使用公共持续工具。[TravisCI][10] and [CircleCI][11] 为开源项目提供免费套餐。将 GitHub 或其他仓库配置为在合并拉请求之前需要先通过检查, 那么你就不必担心在代码评审中告知用户修复测试或样式。 +使用公共持续工具。[TravisCI][10] 和 [CircleCI][11] 为开源项目提供免费套餐。将 GitHub 或其他仓库配置为在合并拉请求之前需要先通过检查,那么你就不必担心在代码评审中告知用户修复测试或样式。 -### 11\. 版本 +### 11、版本 使用 [SemVer][12] 或 [CalVer][13]。有许多工具可以帮助你管理版本:[incremental][14]、[bumpversion][15] 和 [setuptools_scm][16] 等都是 PyPI 上的包,都可以帮助你管理版本。 -### 12\. 发布 +### 12、发布 -通过运行 **tox** 或 **nox** 并使用 **twine** 将文件上传到 PyPI 上发布。你可以通过在 [DevPI][17] 中“测试上传”。 +通过运行 tox 或 nox 并使用 twine 将文件上传到 PyPI 上发布。你可以通过在 [DevPI][17] 中“测试上传”。 -------------------------------------------------------------------------------- @@ -90,7 +89,7 @@ via: https://opensource.com/article/18/12/tips-open-sourcing-python-libraries 作者:[Moshe Zadka][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a339e75ac9863a0e4c7cfacf7047d3a50dadb7ca Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 17:53:24 +0800 Subject: [PATCH 089/164] PUB:20181219 How to open source your Python library.md @geekpi https://linux.cn/article-10491-1.html --- .../20181219 How to open source your Python library.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181219 How to open source your Python library.md (98%) diff --git a/translated/tech/20181219 How to open source your Python library.md b/published/20181219 How to open source your Python library.md similarity index 98% rename from translated/tech/20181219 How to open source your Python library.md rename to published/20181219 How to open source your Python library.md index 8569db33c1..e21eaeedb8 100644 --- a/translated/tech/20181219 How to open source your Python library.md +++ b/published/20181219 How to open source your Python library.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10491-1.html) [#]: subject: (How to open source your Python library) [#]: via: (https://opensource.com/article/18/12/tips-open-sourcing-python-libraries) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) From c14d0eec4400351d1fdf836da8dbe5b802c6f11a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 18:40:16 +0800 Subject: [PATCH 090/164] PRF:20180814 5 open source strategy and simulation games for Linux.md @Scoutydren --- ...strategy and simulation games for Linux.md | 46 ++++++++----------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/translated/tech/20180814 5 open source strategy and simulation games for Linux.md b/translated/tech/20180814 5 open source strategy and simulation games for Linux.md index b7878dd1b6..9666e74c0f 100644 --- a/translated/tech/20180814 5 open source strategy and simulation games for Linux.md +++ b/translated/tech/20180814 5 open source strategy and simulation games for Linux.md @@ -1,73 +1,67 @@ -5款开源的Linux策略模拟游戏 +5 款开源的 Linux 策略模拟游戏 ====== +> 用这些开源游戏来挑战你的战略技能,探索新世界。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/arcade_game_gaming.jpg?itok=84Rjk_32) -长久以来,游戏都是 Linux 的软肋。近些年,Steam,GOG等游戏发布平台上不少商业游戏都开始支持 Linux,这对于 Linux 的游戏生态来说是件好事,但是我们能在这些平台上玩到的游戏通常是不开源的商业作品。当然,这些游戏在一个开源的操作系统上运行,但对于一个开源提倡者来说这似乎还不够纯粹。 +长久以来,游戏都是 Linux 的软肋。近些年,Steam、GOG 等游戏发布平台上不少商业游戏都开始支持 Linux,这对于 Linux 的游戏生态来说是件好事,但是我们能在这些平台上玩到的游戏通常是不开源的商业作品。当然,这些游戏在一个开源的操作系统上运行,但对于一个开源提倡者来说这似乎还不够纯粹。 -那么,我们能找到既免费开源又能给玩家带来完整游戏体验的优质游戏吗?当然!虽然绝大多数的开源游戏很难和3A 商业游戏大作竞争,但仍然有不少各种类型的开源游戏,不仅内容有趣而且直接可以通过几大 Linux 发行版本库中直接安装。就算某个游戏在不在某个发行版本的库中,我们也可以在这个游戏项目的网站上找到直接的安装方法。 +那么,我们能找到既自由开源又能给玩家带来完整游戏体验的优质游戏吗?当然!虽然绝大多数的开源游戏很难和 3A 商业游戏大作竞争,但仍然有不少各种类型的开源游戏,不仅内容有趣而且直接可以通过几大 Linux 发行版本库中直接安装。就算某个游戏在不在某个发行版本的库中,我们也可以在这个游戏项目的网站上找到直接的安装方法。 -本篇文章将会介绍策略和模拟类游戏。我已经写了街机游戏、桌面卡牌游戏、解谜游戏、竞速飞行游戏以及角色扮演游戏。 +本篇文章将会介绍策略和模拟类游戏。我已经写了[街机游戏][1]、[桌面卡牌游戏][2]、[解谜游戏][3]、[竞速飞行游戏][4]以及[角色扮演游戏][5]。 -### Freeciv 开源“文明” +### 开源版“文明”(Freeciv) ![](https://opensource.com/sites/default/files/uploads/freeciv.png) -[Freeciv][6] 可以被视为是文明系列游戏的开源版本。游戏玩法和文明系列最早期的游戏十分类似, Freeciv 可以让玩家选择选用文明 1 或者文明 2 中的游戏规则设置。Freeciv 中包含了很多元素,例如建造城市、探索世界地图、发展科技以及和其他扩张中的文明竞争。胜利条件包括打败所有其他的文明或建立一个外星殖民地,如果在前两者都没有达成的话,在游戏时间期限前存活下来也可以算作胜利。这个游戏可以和其他玩家联机也可以和 AI 对战,不同的地图集可以改变游戏的外观。 +[Freeciv][6] 可以被视为是[文明系列][7]游戏的开源版本。游戏玩法和文明系列最早期的游戏十分类似,Freeciv 可以让玩家选择选用文明 1 或者文明 2 中的游戏规则设置。Freeciv 中包含了很多元素,例如建造城市、探索世界地图、发展科技以及和其他扩张中的文明竞争。胜利条件包括打败所有其他的文明或建立一个外星殖民地,如果在前两者都没有达成的话,在游戏时间期限前存活下来也可以算作胜利。这个游戏可以和其他玩家联机也可以和 AI 对战,不同的地图集可以改变游戏的外观。 安装 Freeciv,你只需要在终端下运行以下指令。 * Fedora 用户: `dnf install freeciv` - * Debian/Ubuntu 用户:`apt install freeciv` - ### MegaGlest ![](https://opensource.com/sites/default/files/uploads/megaglest.png) -[MegaGlest][8] 是一个开源的实时战略游戏,类似暴雪公司制作的游戏魔兽世界和星际争霸。玩家控制不同派别的人员、建造新建筑、招募士兵、拓展领土并与敌人作战。在游戏比赛的最开始,玩家仅能建造最基础的建筑和招募最基础的士兵。为了建造更高级的建筑并招募级别更高的人员,玩家必须通过增加建筑和人员从而一路提高科技树、解锁更加高级的选项。当敌人进入国土领域之中,战斗单元必须迎战。但是最好的应对策略是,通过控制战斗单元直接操控每一场战斗。在管理新建筑的建立,新人员的招募的同时控制战斗局势听上去十分困难,但是这就是RTS(实时战略游戏)游戏的精华所在。MegaGlest 这个游戏提供了大量的人员派类,玩家可以不断尝试这些不同的技巧。 +[MegaGlest][8] 是一个开源的实时战略游戏,类似暴雪公司制作的游戏[魔兽世界][9]和[星际争霸][10]。玩家控制不同派别的人员、建造新建筑、招募士兵、拓展领土并与敌人作战。在游戏比赛的最开始,玩家仅能建造最基础的建筑和招募最基础的士兵。为了建造更高级的建筑并招募级别更高的人员,玩家必须通过增加建筑和人员从而一路提高科技树、解锁更加高级的选项。当敌人进入国土领域之中,战斗单元将会迎战。但是最好的应对策略是,通过控制战斗单元直接操控每一场战斗。在管理新建筑的建立,新人员的招募的同时控制战斗局势听上去十分困难,但是这就是 RTS(实时战略游戏)游戏的精华所在。MegaGlest 这个游戏提供了大量的人员派别,玩家可以不断尝试这些不同的技巧。 安装 MegaGlest,你只需要在终端下运行以下指令: * Fedora 用户: `dnf install megaglest` * Debian/Ubuntu 用户:`apt install megaglest` - - -### OpenTTD 开源版“运输大亨” +### 开源版“运输大亨”(OpenTTD) ![](https://opensource.com/sites/default/files/uploads/openttd.png) -[OpenTTD][11] (见我们的 [评测][12] )是一个开源实现的 [运输大亨][13] 。该游戏的目的在于创建一个交通运输网络并获得金钱,从而建立更加复杂的运输网络。这个运输网络包括了船只、巴士、火车、货车和飞机。默认的游戏时间在1950和2050之间,玩家的目标就是在规定时间内拿到最高的游戏分数。游戏的最终分数基于很多因素,例如货物运输的数量、玩家所拥有的汽车数量以及他们赚到的钱。 +[OpenTTD][11](见我们的 [评测][12] )是一个开源实现的 [运输大亨][13] 。该游戏的目的在于创建一个交通运输网络并获得金钱,从而建立更加复杂的运输网络。这个运输网络包括了船只、巴士、火车、货车和飞机。默认的游戏时间在 1950 和 2050 之间,玩家的目标就是在规定时间内拿到最高的游戏分数。游戏的最终分数基于很多因素,例如货物运输的数量、玩家所拥有的汽车数量以及他们赚到的钱。 安装 OpenTTD,你只需要在终端运行以下指令: * Fedora 用户: `dnf install openttd` * Debian/Ubuntu 用户 `apt install openttd` - - -### The Battle for Wesnoth 韦诺之战 +### 韦诺之战The Battle for Wesnoth ![](https://opensource.com/sites/default/files/uploads/the_battle_for_wesnoth.png) -[韦诺之战][14] 是目前最完善的开源游戏之一。这个回合制游戏在一个奇幻的故事设定下。游戏在一个六角形网格中进行,各个单元可以互相操作进行战斗。每个类型的单元都有它独特的能力和弱点,因此玩家需要根据这些特点来设计不同的行动。韦诺之战中有很多不同的行动分支,每个行动分支都有它特别的故事线和目标。The 韦诺之战同时也有一个地图编辑器,感兴趣的玩家可以创作自己的地图以及行动分支。 +[韦诺之战][14] 是目前最完善的开源游戏之一。这个回合制游戏在一个奇幻的故事设定下。游戏在一个六角形网格中进行,各个单元可以互相操作进行战斗。每个类型的单元都有它独特的能力和弱点,因此玩家需要根据这些特点来设计不同的行动。韦诺之战中有很多不同的行动分支,每个行动分支都有它特别的故事线和目标。韦诺之战同时也有一个地图编辑器,感兴趣的玩家可以创作自己的地图以及行动分支。 安装韦诺之战,你只需要在终端运行以下指令: - * Fedora 用户: `dnf install wesnoth ` + * Fedora 用户: `dnf install wesnoth` * Debian/Ubuntu 用户: `apt install wesnoth` - - -### UFO: Alien Invasion (UFO:外星入侵) +### UFO:外星入侵UFO: Alien Invasion ![](https://opensource.com/sites/default/files/uploads/ufo_alien_invasion.png) -[UFO: Alien Invasion][15] 是一个开源策略游戏,基于幽浮系列 [X-COM series][20]。 有两个不同的游戏模式: geoscape 和tactical。在 geoscape 模式下,玩家控制大局、管理基地、开发新技术以及掌控整体策略。 在tactical 游戏模式下,玩家控制一群士兵并且以回合制的形式直接迎战外星侵略者。两个游戏模式提供了不同的游戏玩法,两者都需要相当复杂的策略和战术。 +[UFO: Alien Invasion][15] 是一个开源策略游戏,基于 [幽浮系列][20]X-COM。 有两个不同的游戏模式: geoscape 和 tactical。在 geoscape 模式下,玩家控制大局、管理基地、开发新技术以及掌控整体策略。 在 tactical 游戏模式下,玩家控制一群士兵并且以回合制的形式直接迎战外星侵略者。两个游戏模式提供了不同的游戏玩法,两者都需要相当复杂的策略和战术。 -安装 UFO:外星入侵,你只需要在终端下运行以下指令: +安装这个游戏,你只需要在终端下运行以下指令: * Debian/Ubuntu 用户: `apt install ufoai` @@ -81,13 +75,13 @@ via: https://opensource.com/article/18/8/strategy-simulation-games-linux 作者:[Joshua Allen Holm][a] 选题:[lujun9972](https://github.com/lujun9972) -译者:[Scoutydren](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[Scoutydren](https://github.com/Scoutydren) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]:https://opensource.com/users/holmja -[1]:https://opensource.com/article/18/1/arcade-games-linux +[1]:https://linux.cn/article-10433-1.html [2]:https://opensource.com/article/18/3/card-board-games-linux [3]:https://opensource.com/article/18/6/puzzle-games-linux [4]:https://opensource.com/article/18/7/racing-flying-games-linux From 641d22173d1ce4db68ac635eb8dc1403f9d0d2d5 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 18:40:53 +0800 Subject: [PATCH 091/164] PUB:20180814 5 open source strategy and simulation games for Linux.md @Scoutydren https://linux.cn/article-10492-1.html --- ...80814 5 open source strategy and simulation games for Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20180814 5 open source strategy and simulation games for Linux.md (100%) diff --git a/translated/tech/20180814 5 open source strategy and simulation games for Linux.md b/published/20180814 5 open source strategy and simulation games for Linux.md similarity index 100% rename from translated/tech/20180814 5 open source strategy and simulation games for Linux.md rename to published/20180814 5 open source strategy and simulation games for Linux.md From 5a080a24807595f17608782ebbbb34e06a138af4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 21:53:10 +0800 Subject: [PATCH 092/164] PRF:20181016 Final JOS project.md --- published/20181016 Final JOS project.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20181016 Final JOS project.md b/published/20181016 Final JOS project.md index 92b14d8f97..93358e622a 100644 --- a/published/20181016 Final JOS project.md +++ b/published/20181016 Final JOS project.md @@ -1,4 +1,4 @@ -Caffeinated 6.828:实验 6:最终的 JOS 项目 +Caffeinated 6.828:实验 7:最终的 JOS 项目 ====== ### 简介 From 3bca9d4cb3498e8708f7cae244aa50471637d9cc Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 22:16:47 +0800 Subject: [PATCH 093/164] PRF:20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @jrglinux 战战兢兢发这篇 @lujun9972 --- ...n a Raspberry Pi 3B- into a PriTunl VPN.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md b/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md index a610a2cfbd..c39d7ea46a 100644 --- a/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md +++ b/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md @@ -1,32 +1,32 @@ [#]: collector: (lujun9972) [#]: translator: (jrglinux) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Turn a Raspberry Pi 3B+ into a PriTunl VPN) [#]: via: (https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi) [#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) -将树梅派3B+变为 PriTunl VPN +将树莓派 3B+ 变为 PriTunl VPN ====== -PriTunl 是一种 VPN 解决方案,适用于希望私密的访问其网络的小型企业和个人。 + +> PriTunl 是一种 VPN 解决方案,适用于希望私密的访问其网络的小型企业和个人。 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2) -[PriTunl][1] 是一款出色的 VPN 终端解决方案,非常适合希望以简单快捷的方式私密的访问网络的小型企业和个人。 它是开源的,基本的免费版本涵盖最通用的简单的实例,足以让你快速入门。 也有集成 Active Directory 等高级功能的付费企业版 +[PriTunl][1] 是一款出色的 VPN 终端解决方案,非常适合希望以简单快捷的方式私密的访问网络的小型企业和个人。它是开源的,基本的免费版本涵盖最通用的简单的实例,足以让你快速入门。也有集成了活动目录等高级功能的付费企业版。 -### 有关树梅派3B+的特别注意事项 +### 有关树莓派 3B+ 的特别注意事项 -PriTunl 的安装通常也很简单,但要在树梅派3B+上安装 PriTunl 有点小复杂。比如,PriTunl 只提供了 AMD64 和 i386 架构的二进制文件,但树梅派3B+是 ARM 架构的,这意味着需要从源码自行编译可用于树梅派3B+的 PriTunl 可执行文件。不过,无需担心,编译过程很简单,只需花一点时间执行几行命令即可。 +PriTunl 的安装通常也很简单,但要在树莓派 3B+ 上安装 PriTunl 有点小复杂。比如,PriTunl 只提供了 AMD64 和 i386 架构的二进制文件,但树莓派 3B+ 是 ARM 架构的,这意味着需要从源码自行编译可用于树莓派 3B+ 的 PriTunl 可执行文件。不过,无需担心,编译过程很简单,只需花一点时间执行几行命令即可。 -另一个问题:PriTunl 好像必须要是64位处理器架构,当我在32位操作系统上尝试编译的时候报错了。但幸运的是,用于 ARM64 架构的 Ubuntu 18.04 测试版本可以安装在树梅派3B+上。 - -同样,树梅派3B+需要和其他树梅派不同的引导程序。需要一组小复杂的命令来安装更新树梅派3B+上必要的组件。 +另一个问题:PriTunl 好像必须要是 64 位处理器架构,当我在 32 位操作系统上尝试编译的时候报错了。但幸运的是,用于 ARM64 架构的 Ubuntu 18.04 测试版本可以安装在树莓派 3B+ 上。 +同样,树莓派 3B+ 需要和其他树莓派不同的引导程序。需要一组小复杂的命令来安装更新树莓派 3B+ 上必要的组件。 ### 安装 PriTunl -你可以先在树梅派3B+上安装64位的操作系统来避免下面这些问题。此处需要一些必要的基础知识如在树梅派上执行命令行。 +你可以先在树莓派 3B+ 上安装 64 位的操作系统来避免下面这些问题。此处需要一些必要的基础知识如在树莓派上执行命令行。 打开终端,用如下命令下载 Ubuntu 18.04 用于 ARM64 架构的测试版: @@ -40,25 +40,25 @@ $ wget http://cdimage.ubuntu.com/releases/18.04/beta/ubuntu-18.04-beta-preinstal $ xz -d ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.xz ``` -将准备好的 SD 卡插入电脑读卡槽,电脑会为 SD 卡分配一个驱动分配器号,例如 **/dev/sda** 或者 **/dev/sdb**。 输入命令 **dmesg** 然后观察屏幕上的最后几行找到 SD 卡的驱动分配器。 +将准备好的 SD 卡插入电脑读卡槽,电脑会为 SD 卡分配一个驱动分配器号,例如 `/dev/sda` 或者 `/dev/sdb`。 输入命令 `dmesg` 然后观察屏幕上的最后几行找到 SD 卡的驱动分配器。 -**下一步小心操作,如果搞错了驱动分配器号,可能会破坏你的系统** +**下一步小心操作,如果搞错了驱动分配器号,可能会破坏你的系统。** -用如下命令往 SD 卡中写入数据,将其中的 **** 替换成你的 SD 驱动器号。 +用如下命令往 SD 卡中写入数据,将其中的 `` 替换成你的 SD 驱动器号。 ``` $ dd if=ubuntu-18.04-beta-preinstalled-server-arm64+raspi3.img of= bs=8M ``` -完成上一步之后,将 SD 卡插入树梅派3B+,并启动它。确保树梅派3B+是连网的,然后登陆系统,用户名/密码:ubuntu/ubuntu。 +完成上一步之后,将 SD 卡插入树莓派 3B+ ,并启动它。确保树莓派 3B+ 是连网的,然后登录系统,用户名/密码:`ubuntu` / `ubuntu`。 -在树梅派上输入以下命令以安装一些准备编译PriTunl的东西: +在树莓派上输入以下命令以安装一些编译 PriTunl 所需的包: ``` $ sudo apt-get -y install build-essential git bzr python python-dev python-pip net-tools openvpn bridge-utils psmisc golang-go libffi-dev mongodb ``` -和 PriTunl 标准源码上的 [安装说明][2] 有一点不一样。确保已经登录进树梅派然后切换到管理员账户: +和 PriTunl 标准源码上的 [安装说明][2] 有一点不一样。确保已经登录进树莓派然后切换到管理员账户: ``` $ sudo su - @@ -86,7 +86,7 @@ pip install -r requirements.txt python2 setup.py install --prefix=/usr/local ``` -现在,不出意外的话应该可以启动 MongoDB 和 PriTunl 系统单元了。假如现在还是以管理员账户登录的话,输入: +现在,不出意外的话应该可以启动 MongoDB 和 PriTunl 的 systemd 单元了。假如现在还是以管理员账户登录的话,输入: ``` systemctl daemon-reload @@ -103,7 +103,7 @@ via: https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi 作者:[Stephen Bancroft][a] 选题:[lujun9972][b] 译者:[jrg](https://github.com/jrglinux) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 55f7e7609fb25f874b8b536388266e6fa7213c57 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 30 Jan 2019 22:17:20 +0800 Subject: [PATCH 094/164] PUB:20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md @jrglinux https://linux.cn/article-10493-1.html --- .../20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md (98%) diff --git a/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md b/published/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md similarity index 98% rename from translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md rename to published/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md index c39d7ea46a..9baed49a1e 100644 --- a/translated/tech/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md +++ b/published/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (jrglinux) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10493-1.html) [#]: subject: (Turn a Raspberry Pi 3B+ into a PriTunl VPN) [#]: via: (https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi) [#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) From ed682e17f3914a6d8e4e04fafc1da2219fd69a66 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Wed, 30 Jan 2019 22:40:55 +0800 Subject: [PATCH 095/164] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...iday calendar at the Linux command line.md | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) rename {sources => translated}/tech/20181207 Plan your own holiday calendar at the Linux command line.md (62%) diff --git a/sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md b/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md similarity index 62% rename from sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md rename to translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md index 9188914bbb..6d959d7339 100644 --- a/sources/tech/20181207 Plan your own holiday calendar at the Linux command line.md +++ b/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md @@ -7,18 +7,18 @@ [#]: via: (https://opensource.com/article/18/12/linux-toy-cal) [#]: author: (Jason Baker https://opensource.com/users/jason-baker) -Plan your own holiday calendar at the Linux command line +在 Linux 命令行中规划你的假期日历 ====== -Link commands together to build a colorful calendar, and then whisk it away in a snowstorm. +将命令链接在一起,构建一个彩色日历,然后在暴风雪中将其拂去。 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-cal.png?itok=S0F8RY9k) -Welcome to today's installment of the Linux command-line toys advent calendar. If this is your first visit to the series, you might be asking yourself, what’s a command-line toy. Even I'm not quite sure, but generally, it could be a game or any simple diversion that helps you have fun at the terminal. +欢迎阅读今天推出的 Linux 命令行玩具降临日历。如果这是你第一次访问本系列,你可能会问:什么是命令行玩具。即使我不太确定,但一般来说,它可以是一个游戏或任何简单的娱乐,可以帮助你在终端玩得开心。 -It's quite possible that some of you will have seen various selections from our calendar before, but we hope there’s at least one new thing for everyone. +很可能你们中的一些人之前已经看过我们日历上的各种选择,但我们希望给每个人至少一件新东西。 -We've somehow made it to the seventh day of our series without creating an actual calendar to celebrate with, so let's use a command-line tool to do that today: **cal**. By itself, **cal** is perhaps not the most amazing of tools, but we can use a few other utilities to spice it up a bit. +我们在没有创建实际日历的情况下完成了本系列的第 7 天,所以今天让我们使用命令行工具来做到这一点:**cal**。就其本身而言,**cal** 可能不是最令人惊奇的工具,但我们可以使用其它一些实用程序来为它增添一些趣味。 -Chances are, **cal** is installed on your system already. To use it in this instance, just type **cal**. +很可能,你的系统上已经安装了 **cal**。要使用它,只需要输入 **cal** 即可。 ``` $ cal @@ -32,9 +32,10 @@ Su Mo Tu We Th Fr Sa 30 31           ``` -We aren't going to go into advanced usage in this article, so if you want to learn more about **cal** , go check out Opensource.com Community Moderator Don Watkin's excellent [overview of the date and cal commands][1]. +我们不打算在本文中深入介绍高级用法,因此如果你想了解有关 **cal** 的更多信息,查看 Opensouce.com 社区版主 Don Watkin 的优秀文章 [date 和 cal 命令概述][1]。 + +现在,让我们用一个漂亮的盒子来为它增添趣味,就像我们在上一篇 Linux 玩具文章中介绍的那样。我将使用钻石块,用一点内边距来对齐。 -Now, let's spice it up with a pretty box, as we covered in our previous Linux toy article. I'll use the diamonds box, and use a little bit of padding to get it nicely aligned. ``` $ cal | boxes -d diamonds -p a1l4t2  @@ -60,7 +61,7 @@ $ cal | boxes -d diamonds -p a1l4t2         \/          \/          \/ ``` -That looks nice, but for good measure, let's put the whole thing in a second box, just for fun. We'll use the scoll design this time. +看起来很不错,但是为了好的测量,让我们把整个东西放到另一个盒子里,为了好玩,这次我们将使用滚动设计。 ``` cal | boxes -d diamonds -p a1t2l3 | boxes -a c -d scroll         @@ -92,25 +93,25 @@ cal | boxes -d diamonds -p a1t2l3 | boxes -a c -d scroll            ~~~                                                ~~~ ``` -Perfect. Now, here's where things get a little crazy. I like our design, but, I'd like to go all out. So I'm going to colorize it. But here in the Raleigh, NC office where Opensource.com's staff are based, there's a good chance for snow this weekend. So let's enjoy our colorized advent calendar, and then wipe it out with snow. +完美。现在,事情变得有点疯狂了。我喜欢我们的设计,但我想全力以赴,所以我要给它上色。但是 Opensource.com 员工所在的北卡罗来版纳州罗利办公室,本周末很有可能下雪。所以,让我们享受彩色降临日历,然后用雪擦掉它。 -For the snow, I'm grabbing a nifty [snippet][2] of Bash and Gawk goodness I found over on CLIMagic. If you're not familiar with CLIMagic, go check out their [website][3] and follow them on [Twitter][4]. You'll be glad you did. +关于雪,我抓取了一些 Bash 和 Gawk 的漂亮[代码片段][2],幸亏我发现了 CLIMagic。如果你不熟悉 CLIMagic,去查看他们的[网站][3],在 [Twitter][4] 上关注他们。你会满意的。 -So here we go. Let's clear the screen, throw up our boxy calendar, colorize it, wait a few seconds, then snowstorm it away. All here at the terminal, in one line. +我们开始吧。让我们清除屏幕,扔掉四四方方的日历,给它上色,等几秒钟,然后用暴风雪把它吹走。这些在终端可以用一行命令完成。 ``` $ clear;cal|boxes -d diamonds -p a1t2l3|boxes -a c -d scroll|lolcat;sleep 3;while :;do echo $LINES $COLUMNS $(($RANDOM%$COLUMNS)) $(printf "\u2744\n");sleep 0.1;done|gawk '{a[$3]=0;for(x in a) {o=a[x];a[x]=a[x]+1;printf "\033[%s;%sH ",o,x;printf "\033[%s;%sH%s \033[0;0H",a[x],x,$4;}}' ``` -And there we go. +大功告成。 ![](https://opensource.com/sites/default/files/uploads/linux-toy-cal-animated.gif) -For this to work on your system, you'll need all of the referenced utilities (boxes, lolcat, cal, gawk, etc.), and you'll need to use a terminal emulator that supports Unicode. +要使它在你的系统上工作,你需要所有它引用的实用程序(box, lolcat, gawk 等),还需要使用支持 Unicode 的终端仿真器。 -Do you have a favorite command-line toy that you think I ought to profile? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end. +你有特别喜欢的命令行小玩具需要我介绍的吗?这个系列要介绍的小玩具大部分已经有了落实,但还预留了几个空位置。请在评论区留言,我会查看的。如果还有空位置,我会考虑介绍它的。如果没有,但如果我得到了一些很好的意见,我会在最后做一些有价值的提及。 -Check out yesterday's toy, [Take a break at the Linux command line with Nyan Cat][5], and check back tomorrow for another! +看看昨天的玩具:[使用 Nyan Cat 在 Linux 命令行休息][5]。记得明天再来! -------------------------------------------------------------------------------- @@ -118,7 +119,7 @@ via: https://opensource.com/article/18/12/linux-toy-cal 作者:[Jason Baker][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[MjSeven](https://github.com/MjSeven) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a5824262594760241113773520b088b1640b1646 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Wed, 30 Jan 2019 17:00:24 +0000 Subject: [PATCH 096/164] =?UTF-8?q?Revert=20"=E7=94=B3=E9=A2=86=E7=BF=BB?= =?UTF-8?q?=E8=AF=91"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 102c89d8621e0d376c3fb053b53f3c6d5c0f5410. --- sources/tech/20180914 A day in the life of a log message.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20180914 A day in the life of a log message.md b/sources/tech/20180914 A day in the life of a log message.md index cc6ebd0f5b..8d60ec9fe6 100644 --- a/sources/tech/20180914 A day in the life of a log message.md +++ b/sources/tech/20180914 A day in the life of a log message.md @@ -1,4 +1,3 @@ -Ryze-Borgia is translating A day in the life of a log message ====== From f9c3542ec172e24ba91bfb634b7a7ba8f538fa20 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 09:44:53 +0800 Subject: [PATCH 097/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020180129=20Tips?= =?UTF-8?q?=20and=20tricks=20for=20using=20CUPS=20for=20printing=20with=20?= =?UTF-8?q?Linux=20sources/tech/20180129=20Tips=20and=20tricks=20for=20usi?= =?UTF-8?q?ng=20CUPS=20for=20printing=20with=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... for using CUPS for printing with Linux.md | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sources/tech/20180129 Tips and tricks for using CUPS for printing with Linux.md diff --git a/sources/tech/20180129 Tips and tricks for using CUPS for printing with Linux.md b/sources/tech/20180129 Tips and tricks for using CUPS for printing with Linux.md new file mode 100644 index 0000000000..f676b0efb9 --- /dev/null +++ b/sources/tech/20180129 Tips and tricks for using CUPS for printing with Linux.md @@ -0,0 +1,101 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Tips and tricks for using CUPS for printing with Linux) +[#]: via: (https://opensource.com/article/19/1/cups-printing-linux) +[#]: author: (Antoine Thomas https://opensource.com/users/ttoine) + +Tips and tricks for using CUPS for printing with Linux +====== +One of Apple's most important contributions to GNU/Linux was adopting CUPS in Mac OS X. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_paper_envelope_document.png?itok=uPj_kouJ) + +Did you ever try to configure a printer on a GNU/Linux desktop distribution at the end of the '90s? Or even before? + +To make a long story short: That was fine if you worked at a large organization with an IT team to handle it and dedicated hardware or a printing server. There were many different standards and protocols to handle printers. And only a few big vendors (usually Unix vendors) provided specific support and drivers for their entire range of products. + +However, if open source enthusiasts wanted a home printer that would work with their favorite distribution, that was another story. They probably spent a fair amount of time on forums, newsgroups, or IRC (remember those ancestors of social networks and chats?) asking about printers with easy-to-install Linux drivers. + +In 1999, the first version of [CUPS][1] (the Common Unix Printing System) was released by Easy Software Products. Most of the most popular distributions at the time adopted CUPS as their default printing system. That was a huge success: one standard could handle many printers and protocols. + +But if the printer vendor didn't provide a CUPS driver, it was still tricky or impossible to make it work. Some smart people might do reverse engineering. And a few printers, with native support of PostScript and Internet Printing Protocol (IPP), worked "out of the box." + +### Then came Apple + +In the early 2000s, Apple was struggling to build a new printing system for its new Mac OS X. In March 2002, it decided to save time by adopting CUPS for its flagship operating system. + +No printer vendor could ignore Apple computers' market share, so a lot of new printer drivers for Mac OS X's CUPS became available, spanning most vendors and product ranges, including corporate, graphic arts, consumer, and photo printing. + +CUPS became so important for Apple that it bought the software from Easy Software Products in 2007; since then Apple has continued to maintain it and manage its intellectual property. + +### But what does that have to do with GNU/Linux? + +At the time Apple integrated CUPS in Mac OS X, it was already used by default in many distros and available for most others. But few dedicated drivers were available, meaning they were not packaged or listed as "for GNU/Linux." + +However, once CUPS drivers were available for Mac OS X, a simple hack became popular with GNU/Linux enthusiasts: download the Mac driver, extract the PPD files, and test them with your printer. I used this hack many times with my Epson printers. + +That's the CUPS magic: If a driver exists, it usually works with all operating systems that use CUPS for printing, as long as they use a supported protocol (like IPP). + +That's how printer drivers began to be available for GNU/Linux. + +### Nowadays + +Afterward, printer vendors realized it was quite easy to provide drivers for GNU/Linux since they already developed them for Mac. It's now easy to find a GNU/Linux driver for a printer, even a newer one. Some distributions include packages with a lot of drivers, and most vendors provide dedicated drivers—sometimes via a package, other times with PPD files in an archive. + +Advanced control applications are available too, some official, some not, which make it possible (for example) to look at ink levels or clean printing heads. + +In some cases, installing a printer on GNU/Linux is even easier than on other operating systems, particularly with distributions using [zero-configuration networking][2] (e.g., Bonjour, Avahi) to auto-discover and share network printers. + +### Tips and tricks + + * **Install a PDF printer:** Installing a PDF printer on GNU/Linux is very easy. Just look for the **cups-pdf** package in your favorite distribution and install it. If the package doesn't automatically create the PDF printer, you can add one using your system preferences to print in PDF from any application. + + * **Access the CUPS web interface:** If your usual interface for managing printers doesn't work or you don't like it, open a web browser and go to . You can manage all the printers installed on your computer, adjust their settings, and even add new ones—all from this web interface. Note that this might be available on other computers on your network; if so, replace "localhost" with the relevant hostname or IP address. + + * **Check ink level:** If you have an Epson, Canon, HP, or Sony printer, you can see its ink level with a simple application. Look for the "ink" package in your distribution repositories. + + * **Contribute to CUPS:** Like many open source project, CUPS is maintained on GitHub. Check the [CUPS website][1] and [GitHub issues][3] to find out how you can contribute to improving it. + + + + +### CUPS license + +Originally, CUPS was released under GPLv2. I'm not sure why; maybe to make it easier to distribute with GNU/Linux. Or maybe it was just what most open source projects did at the time. + +Apple decided to [change the license][4] in November 2017 to the Apache 2.0 license. Many observers commented that it was consistent with Apple's strategy to move the IP of its open source projects to more business-compliant licenses. + +While this change could create issues with shipping CUPS with GNU/Linux, it is still available in most distributions. + +### Happy 20th birthday, CUPS! + +CUPS was released in 1999, so, let's celebrate and thank all the people involved in this successful open source project, from the original authors to the driver developers to its current maintainers. + +The next time you print with your favorite GNU/Linux operating system, remind yourself to say "thank you" to Apple. + +The company isn't well known for its contributions to open source. But if you look carefully (at, for example, [Apple's Open Source Releases][5] and [Open Source Development][6] pages), you'll see how many open source components are in Apple's operating systems and applications. + +You'll also discover other important open source projects Apple kicked off. For example, it forked KHTML, the KDE browser, to create [WebKit][7] for the Safari Browser. Wait, THE WebKit? Yes, Apple initiated WebKit. But that is another story... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/cups-printing-linux + +作者:[Antoine Thomas][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ttoine +[b]: https://github.com/lujun9972 +[1]: https://www.cups.org/ +[2]: https://en.wikipedia.org/wiki/Zero-configuration_networking#Major_implementations +[3]: https://github.com/apple/cups/issues +[4]: https://www.cups.org/blog/2017-11-07-cups-license-change.html +[5]: https://opensource.apple.com/ +[6]: https://developer.apple.com/opensource/ +[7]: https://webkit.org/ From 3b2120ebef743c98d8312a0a4d0d70eebd900f05 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 09:47:37 +0800 Subject: [PATCH 098/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190129=207=20Me?= =?UTF-8?q?thods=20To=20Identify=20Disk=20Partition/FileSystem=20UUID=20On?= =?UTF-8?q?=20Linux=20sources/tech/20190129=207=20Methods=20To=20Identify?= =?UTF-8?q?=20Disk=20Partition-FileSystem=20UUID=20On=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Disk Partition-FileSystem UUID On Linux.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20190129 7 Methods To Identify Disk Partition-FileSystem UUID On Linux.md diff --git a/sources/tech/20190129 7 Methods To Identify Disk Partition-FileSystem UUID On Linux.md b/sources/tech/20190129 7 Methods To Identify Disk Partition-FileSystem UUID On Linux.md new file mode 100644 index 0000000000..366e75846d --- /dev/null +++ b/sources/tech/20190129 7 Methods To Identify Disk Partition-FileSystem UUID On Linux.md @@ -0,0 +1,159 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (7 Methods To Identify Disk Partition/FileSystem UUID On Linux) +[#]: via: (https://www.2daygeek.com/check-partitions-uuid-filesystem-uuid-universally-unique-identifier-linux/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +7 Methods To Identify Disk Partition/FileSystem UUID On Linux +====== + +As a Linux administrator you should aware of that how do you check partition UUID or filesystem UUID. + +Because most of the Linux systems are mount the partitions with UUID. The same has been verified in the `/etc/fstab` file. + +There are many utilities are available to check UUID. In this article we will show you how to check UUID in many ways and you can choose the one which is suitable for you. + +### What Is UUID? + +UUID stands for Universally Unique Identifier which helps Linux system to identify a hard drives partition instead of block device file. + +libuuid is part of the util-linux-ng package since kernel version 2.15.1 and it’s installed by default in Linux system. + +The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique across all systems. + +It’s a 128 bit number used to identify information in computer systems. UUIDs were originally used in the Apollo Network Computing System (NCS) and later UUIDs are standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). + +UUIDs are represented as 32 hexadecimal (base 16) digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 alphanumeric characters and four hyphens). + +For example: d92fa769-e00f-4fd7-b6ed-ecf7224af7fa + +Sample of my /etc/fstab file. + +``` +# cat /etc/fstab + +# /etc/fstab: static file system information. +# +# Use 'blkid' to print the universally unique identifier for a device; this may +# be used with UUID= as a more robust way to name devices that works even if +# disks are added and removed. See fstab(5). +# +# +UUID=69d9dd18-36be-4631-9ebb-78f05fe3217f / ext4 defaults,noatime 0 1 +UUID=a2092b92-af29-4760-8e68-7a201922573b swap swap defaults,noatime 0 2 +``` + +We can check this using the following seven commands. + + * **`blkid Command:`** locate/print block device attributes. + * **`lsblk Command:`** lsblk lists information about all available or the specified block devices. + * **`hwinfo Command:`** hwinfo stands for hardware information tool is another great utility that used to probe for the hardware present in the system. + * **`udevadm Command:`** udev management tool. + * **`tune2fs Command:`** adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems. + * **`dumpe2fs Command:`** dump ext2/ext3/ext4 filesystem information. + * **`Using by-uuid Path:`** The directory contains UUID and real block device files, UUIDs were symlink with real block device files. + + + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing blkid Command? + +blkid is a command-line utility to locate/print block device attributes. It uses libblkid library to get disk partition UUID in Linux system. + +``` +# blkid +/dev/sda1: UUID="d92fa769-e00f-4fd7-b6ed-ecf7224af7fa" TYPE="ext4" PARTUUID="eab59449-01" +/dev/sdc1: UUID="d17e3c31-e2c9-4f11-809c-94a549bc43b7" TYPE="ext2" PARTUUID="8cc8f9e5-01" +/dev/sdc3: UUID="ca307aa4-0866-49b1-8184-004025789e63" TYPE="ext4" PARTUUID="8cc8f9e5-03" +/dev/sdc5: PARTUUID="8cc8f9e5-05" +``` + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing lsblk Command? + +lsblk lists information about all available or the specified block devices. The lsblk command reads the sysfs filesystem and udev db to gather information. + +If the udev db is not available or lsblk is compiled without udev support than it tries to read LABELs, UUIDs and filesystem types from the block device. In this case root permissions are necessary. The command prints all block devices (except RAM disks) in a tree-like format by default. + +``` +# lsblk -o name,mountpoint,size,uuid +NAME MOUNTPOINT SIZE UUID +sda 30G +└─sda1 / 20G d92fa769-e00f-4fd7-b6ed-ecf7224af7fa +sdb 10G +sdc 10G +├─sdc1 1G d17e3c31-e2c9-4f11-809c-94a549bc43b7 +├─sdc3 1G ca307aa4-0866-49b1-8184-004025789e63 +├─sdc4 1K +└─sdc5 1G +sdd 10G +sde 10G +sr0 1024M +``` + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing by-uuid path? + +The directory contains UUID and real block device files, UUIDs were symlink with real block device files. + +``` +# ls -lh /dev/disk/by-uuid/ +total 0 +lrwxrwxrwx 1 root root 10 Jan 29 08:34 ca307aa4-0866-49b1-8184-004025789e63 -> ../../sdc3 +lrwxrwxrwx 1 root root 10 Jan 29 08:34 d17e3c31-e2c9-4f11-809c-94a549bc43b7 -> ../../sdc1 +lrwxrwxrwx 1 root root 10 Jan 29 08:34 d92fa769-e00f-4fd7-b6ed-ecf7224af7fa -> ../../sda1 +``` + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing hwinfo Command? + +**[hwinfo][1]** stands for hardware information tool is another great utility that used to probe for the hardware present in the system and display detailed information about varies hardware components in human readable format. + +``` +# hwinfo --block | grep by-uuid | awk '{print $3,$7}' +/dev/sdc1, /dev/disk/by-uuid/d17e3c31-e2c9-4f11-809c-94a549bc43b7 +/dev/sdc3, /dev/disk/by-uuid/ca307aa4-0866-49b1-8184-004025789e63 +/dev/sda1, /dev/disk/by-uuid/d92fa769-e00f-4fd7-b6ed-ecf7224af7fa +``` + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing udevadm Command? + +udevadm expects a command and command specific options. It controls the runtime behavior of systemd-udevd, requests kernel events, manages the event queue, and provides simple debugging mechanisms. + +``` +udevadm info -q all -n /dev/sdc1 | grep -i by-uuid | head -1 +S: disk/by-uuid/d17e3c31-e2c9-4f11-809c-94a549bc43b7 +``` + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing tune2fs Command? + +tune2fs allows the system administrator to adjust various tunable filesystem parameters on Linux ext2, ext3, or ext4 filesystems. The current values of these options can be displayed by using the -l option. + +``` +# tune2fs -l /dev/sdc1 | grep UUID +Filesystem UUID: d17e3c31-e2c9-4f11-809c-94a549bc43b7 +``` + +### How To Check Disk Partition/FileSystem UUID In Linux Uusing dumpe2fs Command? + +dumpe2fs prints the super block and blocks group information for the filesystem present on device. + +``` +# dumpe2fs /dev/sdc1 | grep UUID +dumpe2fs 1.43.5 (04-Aug-2017) +Filesystem UUID: d17e3c31-e2c9-4f11-809c-94a549bc43b7 +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/check-partitions-uuid-filesystem-uuid-universally-unique-identifier-linux/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/hwinfo-check-display-detect-system-hardware-information-linux/ From ea5483292c08362ccef1faa70a224751cb253ae2 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 09:53:16 +0800 Subject: [PATCH 099/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190129=20How=20?= =?UTF-8?q?To=20Configure=20System-wide=20Proxy=20Settings=20Easily=20And?= =?UTF-8?q?=20Quickly=20sources/tech/20190129=20How=20To=20Configure=20Sys?= =?UTF-8?q?tem-wide=20Proxy=20Settings=20Easily=20And=20Quickly.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-wide Proxy Settings Easily And Quickly.md | 309 ++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 sources/tech/20190129 How To Configure System-wide Proxy Settings Easily And Quickly.md diff --git a/sources/tech/20190129 How To Configure System-wide Proxy Settings Easily And Quickly.md b/sources/tech/20190129 How To Configure System-wide Proxy Settings Easily And Quickly.md new file mode 100644 index 0000000000..0848111d08 --- /dev/null +++ b/sources/tech/20190129 How To Configure System-wide Proxy Settings Easily And Quickly.md @@ -0,0 +1,309 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How To Configure System-wide Proxy Settings Easily And Quickly) +[#]: via: (https://www.ostechnix.com/how-to-configure-system-wide-proxy-settings-easily-and-quickly/) +[#]: author: (SK https://www.ostechnix.com/author/sk/) + +How To Configure System-wide Proxy Settings Easily And Quickly +====== + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/ProxyMan-720x340.png) + +Today, we will be discussing a simple, yet useful command line utility named **“ProxyMan”**. As the name says, it helps you to apply and manage proxy settings on our system easily and quickly. Using ProxyMan, we can set or unset proxy settings automatically at multiple points, without having to configure them manually one by one. It also allows you to save the settings for later use. In a nutshell, ProxyMan simplifies the task of configuring system-wide proxy settings with a single command. It is free, open source utility written in **Bash** and standard POSIX tools, no dependency required. ProxyMan can be helpful if you’re behind a proxy server and you want to apply the proxy settings system-wide in one go. + +### Installing ProxyMan + +Download the latest ProxyMan version from the [**releases page**][1]. It is available as zip and tar file. I am going to download zip file. + +``` +$ wget https://github.com/himanshub16/ProxyMan/archive/v3.1.1.zip +``` + +Extract the downloaded zip file: + +``` +$ unzip v3.1.1.zip +``` + +The above command will extract the contents in a folder named “ **ProxyMan-3.1.1** ” in your current working directory. Cd to that folder and install ProxyMan as shown below: + +``` +$ cd ProxyMan-3.1.1/ + +$ ./install +``` + +If you see **“Installed successfully”** message as output, congratulations! ProxyMan has been installed. + +Let us go ahead and see how to configure proxy settings. + +### Configure System-wide Proxy Settings + +ProxyMan usage is pretty simple and straight forward. Like I already said, It allows us to set/unset proxy settings, list current proxy settings, list available configs, save settings in a profile and load profile later. Proxyman currently manages proxy settings for **GNOME gsettings** , **bash** , **apt** , **dnf** , **git** , **npm** and **Dropbox**. + +**Set proxy settings** + +To set proxy settings system-wide, simply run: + +``` +$ proxyman set +``` + +You will asked to answer a series of simple questions such as, + + 1. HTTP Proxy host IP address, + 2. HTTP port, + 3. Use username/password authentication, + 4. Use same settings for HTTPS and FTP, + 5. Save profile for later use, + 6. Finally, choose the list of targets to apply the proxy settings. You can choose all at once or separate multiple choices with space. + + + +Sample output for the above command: + +``` +Enter details to set proxy +HTTP Proxy Host 192.168.225.22 +HTTP Proxy Port 8080 +Use auth - userid/password (y/n)? n +Use same for HTTPS and FTP (y/n)? y +No Proxy (default localhost,127.0.0.1,192.168.1.1,::1,*.local) +Save profile for later use (y/n)? y +Enter profile name : proxy1 +Saved to /home/sk/.config/proxyman/proxy1. + +Select targets to modify +| 1 | All of them ... Don't bother me +| 2 | Terminal / bash / zsh (current user) +| 3 | /etc/environment +| 4 | apt/dnf (Package manager) +| 5 | Desktop settings (GNOME/Ubuntu) +| 6 | npm & yarn +| 7 | Dropbox +| 8 | Git +| 9 | Docker + +Separate multiple choices with space +? 1 +Setting proxy... +To activate in current terminal window +run source ~/.bashrc +[sudo] password for sk: +Done +``` + +**List proxy settings** + +To view the current proxy settings, run: + +``` +$ proxyman list +``` + +Sample output: + +``` +Hmm... listing it all + +Shell proxy settings : /home/sk/.bashrc +export http_proxy="http://192.168.225.22:8080/" +export ftp_proxy="ftp://192.168.225.22:8080/" +export rsync_proxy="rsync://192.168.225.22:8080/" +export no_proxy="localhost,127.0.0.1,192.168.1.1,::1,*.local" +export HTTP_PROXY="http://192.168.225.22:8080/" +export FTP_PROXY="ftp://192.168.225.22:8080/" +export RSYNC_PROXY="rsync://192.168.225.22:8080/" +export NO_PROXY="localhost,127.0.0.1,192.168.1.1,::1,*.local" +export https_proxy="/" +export HTTPS_PROXY="/" + +git proxy settings : +http http://192.168.225.22:8080/ +https https://192.168.225.22:8080/ + +APT proxy settings : +3 +Done +``` + +**Unset proxy settings** + +To unset proxy settings, the command would be: + +``` +$ proxyman unset +``` + +You can unset proxy settings for all targets at once by entering number **1** or enter any given number to unset proxy settings for the respective target. + +``` +Select targets to modify +| 1 | All of them ... Don't bother me +| 2 | Terminal / bash / zsh (current user) +| 3 | /etc/environment +| 4 | apt/dnf (Package manager) +| 5 | Desktop settings (GNOME/Ubuntu) +| 6 | npm & yarn +| 7 | Dropbox +| 8 | Git +| 9 | Docker + +Separate multiple choices with space +? 1 +Unset all proxy settings +To activate in current terminal window +run source ~/.bashrc +Done +``` + +To apply the changes, simply run: + +``` +$ source ~/.bashrc +``` + +On ZSH, use this command instead: + +``` +$ source ~/.zshrc +``` + +To verify if the proxy settings have been removed, simply run “proxyman list” command: + +``` +$ proxyman list +Hmm... listing it all + +Shell proxy settings : /home/sk/.bashrc +None + +git proxy settings : +http +https + +APT proxy settings : +None +Done +``` + +As you can see, there is no proxy settings for all targets. + +**View list of configs (profiles)** + +Remember we saved proxy settings as a profile in the “Set proxy settings” section? You can view the list of available profiles with command: + +``` +$ proxyman configs +``` + +Sample output: + +``` +Here are available configs! +proxy1 +Done +``` + +As you can see, we have only one profile i.e **proxy1**. + +**Load profiles** + +The profiles will be available until you delete them permanently, so you can load a profile (E.g proxy1) at any time using command: + +``` +$ proxyman load proxy1 +``` + +This command will list the proxy settings for proxy1 profile. You can apply these settings to all or multiple targets by entering the respective number with space-separated. + +``` +Loading profile : proxy1 +HTTP > 192.168.225.22 8080 +HTTPS > 192.168.225.22 8080 +FTP > 192.168.225.22 8080 +no_proxy > localhost,127.0.0.1,192.168.1.1,::1,*.local +Use auth > n +Use same > y +Config > +Targets > +Select targets to modify +| 1 | All of them ... Don't bother me +| 2 | Terminal / bash / zsh (current user) +| 3 | /etc/environment +| 4 | apt/dnf (Package manager) +| 5 | Desktop settings (GNOME/Ubuntu) +| 6 | npm & yarn +| 7 | Dropbox +| 8 | Git +| 9 | Docker + +Separate multiple choices with space +? 1 +Setting proxy... +To activate in current terminal window +run source ~/.bashrc +Done +``` + +Finally, activate the changes using command: + +``` +$ source ~/.bashrc +``` + +For ZSH: + +``` +$ source ~/.zshrc +``` + +**Deleting profiles** + +To delete a profile, run: + +``` +$ proxyman delete proxy1 +``` + +Output: + +``` +Deleting profile : proxy1 +Done +``` + +To display help, run: + +``` +$ proxyman help +``` + + +### Conclusion + +Before I came to know about Proxyman, I used to apply proxy settings manually at multiple places, for example package manager, web browser etc. Not anymore! ProxyMan did this job automatically in couple seconds. + +And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned. + +Cheers! + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/how-to-configure-system-wide-proxy-settings-easily-and-quickly/ + +作者:[SK][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/himanshub16/ProxyMan/releases/ From 72f5dcccde89be61ce3bfadbd3f89678c0b4283b Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 09:56:46 +0800 Subject: [PATCH 100/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020180128=20Get=20?= =?UTF-8?q?started=20with=20Org=20mode=20without=20Emacs=20sources/tech/20?= =?UTF-8?q?180128=20Get=20started=20with=20Org=20mode=20without=20Emacs.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Get started with Org mode without Emacs.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/tech/20180128 Get started with Org mode without Emacs.md diff --git a/sources/tech/20180128 Get started with Org mode without Emacs.md b/sources/tech/20180128 Get started with Org mode without Emacs.md new file mode 100644 index 0000000000..75a5bcb092 --- /dev/null +++ b/sources/tech/20180128 Get started with Org mode without Emacs.md @@ -0,0 +1,78 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Org mode without Emacs) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-org-mode) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with Org mode without Emacs +====== +No, you don't need Emacs to use Org, the 16th in our series on open source tools that will make you more productive in 2019. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/web_browser_desktop_devlopment_design_system_computer.jpg?itok=pfqRrJgh) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 16th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Org (without Emacs) + +[Org mode][1] (or just Org) is not in the least bit new, but there are still many people who have never used it. They would love to try it out to get a feel for how Org can help them be productive. But the biggest barrier is that Org is associated with Emacs, and many people think one requires the other. Not so! Org can be used with a variety of other tools and editors once you understand the basics. + +![](https://opensource.com/sites/default/files/uploads/org-1.png) + +Org, at its very heart, is a structured text file. It has headers, subheaders, and keywords that allow other tools to parse files into agendas and to-do lists. Org files can be edited with any flat-text editor (e.g., [Vim][2], [Atom][3], or [Visual Studio Code][4]), and many have plugins that help create and manage Org files. + +A basic Org file looks something like this: + +``` +* Task List +** TODO Write Article for Day 16 - Org w/out emacs +   DEADLINE: <2019-01-25 12:00> +*** DONE Write sample org snippet for article +    - Include at least one TODO and one DONE item +    - Show notes +    - Show SCHEDULED and DEADLINE +*** TODO Take Screenshots +** Dentist Appointment +   SCHEDULED: <2019-01-31 13:30-14:30> +``` + +Org uses an outline format that uses ***** as bullets to indicate an item's level. Any item that begins with the word TODO (yes, in all caps) is just that—a to-do item. The work DONE indicates it is completed. SCHEDULED and DEADLINE indicate dates and times relevant to the item. If there's no time in either field, the item is considered an all-day event. + +With the right plugins, your favorite text editor becomes a powerhouse of productivity and organization. For example, the [vim-orgmode][5] plugin's features include functions to create Org files, syntax highlighting, and key commands to generate agendas and comprehensive to-do lists across files. + +![](https://opensource.com/sites/default/files/uploads/org-2.png) + +The Atom [Organized][6] plugin adds a sidebar on the right side of the screen that shows the agenda and to-do items in Org files. It can read from multiple files by default with a path set up in the configuration options. The Todo sidebar allows you to click on a to-do item to mark it done, then automatically updates the source Org file. + +![](https://opensource.com/sites/default/files/uploads/org-3.png) + +There are also a whole host of tools that "speak Org" to help keep you productive. With libraries in Python, Perl, PHP, NodeJS, and more, you can develop your own scripts and tools. And, of course, there is also [Emacs][7], which has Org support within the core distribution. + +![](https://opensource.com/sites/default/files/uploads/org-4.png) + +Org mode is one of the best tools for keeping on track with what needs to be done and when. And, contrary to myth, it doesn't need Emacs, just a text editor. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-org-mode + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://orgmode.org/ +[2]: https://www.vim.org/ +[3]: https://atom.io/ +[4]: https://code.visualstudio.com/ +[5]: https://github.com/jceb/vim-orgmode +[6]: https://atom.io/packages/organized +[7]: https://www.gnu.org/software/emacs/ From 7b675e456bf11a82362edd4b3ef1d511edc5d37f Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 10:07:17 +0800 Subject: [PATCH 101/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190128=203=20si?= =?UTF-8?q?mple=20and=20useful=20GNOME=20Shell=20extensions=20sources/tech?= =?UTF-8?q?/20190128=203=20simple=20and=20useful=20GNOME=20Shell=20extensi?= =?UTF-8?q?ons.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...imple and useful GNOME Shell extensions.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/tech/20190128 3 simple and useful GNOME Shell extensions.md diff --git a/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md b/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md new file mode 100644 index 0000000000..c22feddf01 --- /dev/null +++ b/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (3 simple and useful GNOME Shell extensions) +[#]: via: (https://fedoramagazine.org/3-simple-and-useful-gnome-shell-extensions/) +[#]: author: (Ryan Lerch https://fedoramagazine.org/introducing-flatpak/) + +3 simple and useful GNOME Shell extensions +====== + +![](https://fedoramagazine.org/wp-content/uploads/2019/01/3simple-816x345.png) + +The default desktop of Fedora Workstation — GNOME Shell — is known and loved by many users for its minimal, clutter-free user interface. It is also known for the ability to add to the stock interface using extensions. In this article, we cover 3 simple, and useful extensions for GNOME Shell. These three extensions provide a simple extra behaviour to your desktop; simple tasks that you might do every day. + + +### Installing Extensions + +The quickest and easiest way to install GNOME Shell extensions is with the Software Application. Check out the previous post here on the Magazine for more details: + +![](https://fedoramagazine.org/wp-content/uploads/2018/11/installing-extensions-768x325.jpg) + +### Removable Drive Menu + +![][1] +Removable Drive Menu extension on Fedora 29 + +First up is the [Removable Drive Menu][2] extension. It is a simple tool that adds a small widget in the system tray if you have a removable drive inserted into your computer. This allows you easy access to open Files for your removable drive, or quickly and easily eject the drive for safe removal of the device. + +![][3] +Removable Drive Menu in the Software application + +### Extensions Extension. + +![][4] + +The [Extensions][5] extension is super useful if you are always installing and trying out new extensions. It provides a list of all the installed extensions, allowing you to enable or disable them. Additionally, if an extension has settings, it allows quick access to the settings dialog for each one. + +![][6] +the Extensions extension in the Software application + +### Frippery Move Clock + +![][7] + +Finally, there is the simplest extension in the list. [Frippery Move Clock][8], simply moves the position of the clock from the center of the top bar to the right, next to the status area. + +![][9] + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/3-simple-and-useful-gnome-shell-extensions/ + +作者:[Ryan Lerch][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/introducing-flatpak/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/01/removable-disk-1024x459.jpg +[2]: https://extensions.gnome.org/extension/7/removable-drive-menu/ +[3]: https://fedoramagazine.org/wp-content/uploads/2019/01/removable-software-1024x723.png +[4]: https://fedoramagazine.org/wp-content/uploads/2019/01/extensions-extension-1024x459.jpg +[5]: https://extensions.gnome.org/extension/1036/extensions/ +[6]: https://fedoramagazine.org/wp-content/uploads/2019/01/extensions-software-1024x723.png +[7]: https://fedoramagazine.org/wp-content/uploads/2019/01/move_clock-1024x189.jpg +[8]: https://extensions.gnome.org/extension/2/move-clock/ +[9]: https://fedoramagazine.org/wp-content/uploads/2019/01/Screenshot-from-2019-01-28-21-53-18-1024x723.png From 96a36a45bf938f64920bb579be1495552a55039c Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 10:08:56 +0800 Subject: [PATCH 102/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190128=20fdisk?= =?UTF-8?q?=20=E2=80=93=20Easy=20Way=20To=20Manage=20Disk=20Partitions=20I?= =?UTF-8?q?n=20Linux=20sources/tech/20190128=20fdisk=20-=20Easy=20Way=20To?= =?UTF-8?q?=20Manage=20Disk=20Partitions=20In=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Way To Manage Disk Partitions In Linux.md | 524 ++++++++++++++++++ 1 file changed, 524 insertions(+) create mode 100644 sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md diff --git a/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md b/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md new file mode 100644 index 0000000000..cc89e8c7f1 --- /dev/null +++ b/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md @@ -0,0 +1,524 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (fdisk – Easy Way To Manage Disk Partitions In Linux) +[#]: via: (https://www.2daygeek.com/linux-fdisk-command-to-manage-disk-partitions/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +fdisk – Easy Way To Manage Disk Partitions In Linux +====== + +Hard disks can be divided into one or more logical disks called partitions. + +This division is described in the partition table (MBR or GPT) found in sector 0 of the disk. + +Linux needs at least one partition, namely for its root file system and we can’t install Linux OS without partitions. + +Once created, a partition must be formatted with an appropriate file system before files can be written to it. + +To do so, we need some utility to perform this in Linux. + +There are many utilities are available for that in Linux. We had written about **[Parted Command][1]** in the past and today we are going to discuss about fdisk. + +fdisk command is one of the the best tool to manage disk partitions in Linux. + +It supports maximum `2 TB`, and everyone prefer to go with fdisk. + +This tool is used by vast of Linux admin because we don’t use more than 2TB now a days due to LVM and SAN. It’s used in most of the infra structure around the world. + +Still if you want to create a large partitions, like more than 2TB then you have to go either **Parted Command** or **cfdisk Command**. + +Disk partition and file system creations is one of the routine task for Linux admin. + +If you are working on vast environment then you have to perform this task multiple times in a day. + +### How Linux Kernel Understand Hard Disks? + +As a human we can easily understand things but computer needs the proper naming conversion to understand each and everything. + +In Linux, devices are located on `/dev` partition and Kernel understand the hard disk in the following format. + + * **`/dev/hdX[a-z]:`** IDE Disk is named hdX in Linux + * **`/dev/sdX[a-z]:`** SCSI Disk is named sdX in Linux + * **`/dev/xdX[a-z]:`** XT Disk is named sdX in Linux + * **`/dev/vdX[a-z]:`** Virtual Hard Disk is named vdX in Linux + * **`/dev/fdN:`** Floppy Drive is named fdN in Linux + * **`/dev/scdN or /dev/srN:`** CD-ROM is named /dev/scdN or /dev/srN in Linux + + + +### What Is fdisk Command? + +fdisk stands for fixed disk or format disk is a cli utility that allow users to perform following actions on disks. It allows us to view, create, resize, delete, move and copy the partitions. + +It understands MBR, Sun, SGI and BSD partition tables and it doesn’t understand GUID Partition Table (GPT) and it is not designed for large partitions. + +fdisk allows us to create a maximum of four primary partitions per disk. One of these may be an extended partition and it holds multiple logical partitions. + +1-4 is reserved for four primary partitions and Logical partitions start numbering from 5. +![][3] + +### How To Install fdisk On Linux + +You don’t need to install fdisk in Linux system because it has installed by default as part of core utility. + +### How To List Available Disks Using fdisk Command + +First we have to know what are the disks were added in the system before performing any action. To list all available disks on your system run the following command. + +It lists possible information about the disks such as disk name, how many partitions are created in it, Disk Size, Disklabel type, Disk Identifier, Partition ID and Partition Type. + +``` +$ sudo fdisk -l +Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0xeab59449 + +Device Boot Start End Sectors Size Id Type +/dev/sda1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 20973568 62914559 41940992 20G 83 Linux + + +Disk /dev/sdb: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes + + +Disk /dev/sdc: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes + + +Disk /dev/sdd: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes + + +Disk /dev/sde: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +``` + +### How To List A Specific Disk Partitions Using fdisk Command + +If you would like to see a specific disk and it’s partitions, use the following format. + +``` +$ sudo fdisk -l /dev/sda +Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0xeab59449 + +Device Boot Start End Sectors Size Id Type +/dev/sda1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 20973568 62914559 41940992 20G 83 Linux +``` + +### How To List Available Actions For fdisk Command + +When you hit `m` in the fdisk command that will show you available actions for fdisk command. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. +Created a new DOS disklabel with disk identifier 0xe944b373. + +Command (m for help): m + +Help: + + DOS (MBR) + a toggle a bootable flag + b edit nested BSD disklabel + c toggle the dos compatibility flag + + Generic + d delete a partition + F list free unpartitioned space + l list known partition types + n add a new partition + p print the partition table + t change a partition type + v verify the partition table + i print information about a partition + + Misc + m print this menu + u change display/entry units + x extra functionality (experts only) + + Script + I load disk layout from sfdisk script file + O dump disk layout to sfdisk script file + + Save & Exit + w write table to disk and exit + q quit without saving changes + + Create a new label + g create a new empty GPT partition table + G create a new empty SGI (IRIX) partition table + o create a new empty DOS partition table + s create a new empty Sun partition table +``` + +### How To List Partitions Types Using fdisk Command + +When you hit `l` in the fdisk command that will show you an available partitions type for fdisk command. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Device does not contain a recognized partition table. +Created a new DOS disklabel with disk identifier 0x9ffd00db. + +Command (m for help): l + + 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris + 1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT- + 2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT- + 3 XENIX usr 3c PartitionMagic 84 OS/2 hidden or c6 DRDOS/sec (FAT- + 4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx + 5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data + 6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / . + 7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility + 8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt + 9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access + a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O + b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor + c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi ea Rufus alignment + e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD eb BeOS fs + f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ee GPT +10 OPUS 55 EZ-Drive a7 NeXTSTEP ef EFI (FAT-12/16/ +11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f0 Linux/PA-RISC b +12 Compaq diagnost 5c Priam Edisk a9 NetBSD f1 SpeedStor +14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f4 SpeedStor +16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ f2 DOS secondary +17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fb VMware VMFS +18 AST SmartSleep 65 Novell Netware b8 BSDI swap fc VMware VMKCORE +1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fd Linux raid auto +1c Hidden W95 FAT3 75 PC/IX bc Acronis FAT32 L fe LANstep +1e Hidden W95 FAT1 80 Old Minix be Solaris boot ff BBT +``` + +### How To Create A Disk Partition Using fdisk Command + +If you would like to create a new partition use the following steps. In my case, i'm going to create 4 partitions (3 Primary and 1 Extended) on `/dev/sdc` disk. To the same for other partitions too. + +As this takes value from partition table so, hit `Enter` for first sector. Enter the size which you want to set for the partition (We can add a partition size using KB,MB,G and TB) for last sector. + +For example, if you would like to add 1GB partition then the last sector value should be `+1G`. Once you have created 3 partitions, it will automatically change the partition type to extended as a default. If you still want to create a fourth primary partitions then hit `p` instead of default value `e`. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): n +Partition type + p primary (0 primary, 0 extended, 4 free) + e extended (container for logical partitions) +Select (default p): Enter + +Using default response p. +Partition number (1-4, default 1): Enter +First sector (2048-20971519, default 2048): Enter +Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519): +1G + +Created a new partition 1 of type 'Linux' and of size 1 GiB. + +Command (m for help): p +Disk /dev/sdc: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0x8cc8f9e5 + +Device Boot Start End Sectors Size Id Type +/dev/sdc1 2048 2099199 2097152 1G 83 Linux + +Command (m for help): w +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +``` + +### How To Create A Extended Disk Partition Using fdisk Command + +Make a note, you have to use remaining all space when you create a extended partition because again you can able to create multiple logical partition in that. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): n +Partition type + p primary (3 primary, 0 extended, 1 free) + e extended (container for logical partitions) +Select (default e): Enter + +Using default response e. +Selected partition 4 +First sector (6293504-20971519, default 6293504): Enter +Last sector, +sectors or +size{K,M,G,T,P} (6293504-20971519, default 20971519): Enter + +Created a new partition 4 of type 'Extended' and of size 7 GiB. + +Command (m for help): p +Disk /dev/sdc: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0x8cc8f9e5 + +Device Boot Start End Sectors Size Id Type +/dev/sdc1 2048 2099199 2097152 1G 83 Linux +/dev/sdc2 2099200 4196351 2097152 1G 83 Linux +/dev/sdc3 4196352 6293503 2097152 1G 83 Linux +/dev/sdc4 6293504 20971519 14678016 7G 5 Extended + +Command (m for help): w +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +``` + +### How To View Unpartitioned Disk Space Using fdisk Command + +As described in the above section, we have totally created 4 partitions (3 Primary and 1 Extended). Extended partition disk space will show unpartitioned until you create a logical partitions in that. + +Use the following command to view the unpartitioned space for a disk. As per the below output we have `7GB` unpartitioned disk. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): F +Unpartitioned space /dev/sdc: 7 GiB, 7515144192 bytes, 14678016 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes + + Start End Sectors Size +6293504 20971519 14678016 7G + +Command (m for help): q +``` + +### How To Create A Logical Partition Using fdisk Command + +Follow the same above procedure to create a logical partition once you have created the extended partition. +Here, i have created `1GB` of logical partition called `/dev/sdc5`, you can double confirm this by checking the partition table value. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + +Command (m for help): n +All primary partitions are in use. +Adding logical partition 5 +First sector (6295552-20971519, default 6295552): Enter +Last sector, +sectors or +size{K,M,G,T,P} (6295552-20971519, default 20971519): +1G + +Created a new partition 5 of type 'Linux' and of size 1 GiB. + +Command (m for help): p +Disk /dev/sdc: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0x8cc8f9e5 + +Device Boot Start End Sectors Size Id Type +/dev/sdc1 2048 2099199 2097152 1G 83 Linux +/dev/sdc2 2099200 4196351 2097152 1G 83 Linux +/dev/sdc3 4196352 6293503 2097152 1G 83 Linux +/dev/sdc4 6293504 20971519 14678016 7G 5 Extended +/dev/sdc5 6295552 8392703 2097152 1G 83 Linux + +Command (m for help): w +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +``` + +### How To Delete A Partition Using fdisk Command + +If the partition is no more used in the system than we can remove it by using the below steps. + +Make sure you have to enter the correct partition number to delete it. In this case, i'm going to remove `/dev/sdc2` partition. + +``` +$ sudo fdisk /dev/sdc + +Welcome to fdisk (util-linux 2.30.1). +Changes will remain in memory only, until you decide to write them. +Be careful before using the write command. + + +Command (m for help): d +Partition number (1-5, default 5): 2 + +Partition 2 has been deleted. + +Command (m for help): p +Disk /dev/sdc: 10 GiB, 10737418240 bytes, 20971520 sectors +Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: dos +Disk identifier: 0x8cc8f9e5 + +Device Boot Start End Sectors Size Id Type +/dev/sdc1 2048 2099199 2097152 1G 83 Linux +/dev/sdc3 4196352 6293503 2097152 1G 83 Linux +/dev/sdc4 6293504 20971519 14678016 7G 5 Extended +/dev/sdc5 6295552 8392703 2097152 1G 83 Linux + +Command (m for help): w +The partition table has been altered. +Calling ioctl() to re-read partition table. +Syncing disks. +``` + +### How To Format A Partition Or Create A FileSystem On The Partition + +In computing, a file system or filesystem controls how data is stored and retrieved through inode tables. + +Without a file system, the system can't find where the information is stored on the partition. Filesystem can be created in three ways. Here, i'm going to create a filesystem on `/dev/sdc1` partition. + +``` +$ sudo mkfs.ext4 /dev/sdc1 +or +$ sudo mkfs -t ext4 /dev/sdc1 +or +$ sudo mke2fs /dev/sdc1 + +mke2fs 1.43.5 (04-Aug-2017) +Creating filesystem with 262144 4k blocks and 65536 inodes +Filesystem UUID: c0a99b51-2b61-4f6a-b960-eb60915faab0 +Superblock backups stored on blocks: + 32768, 98304, 163840, 229376 + +Allocating group tables: done +Writing inode tables: done +Creating journal (8192 blocks): done +Writing superblocks and filesystem accounting information: done +``` + +When you creating a filesystem on tha partition that will create the following important things on it. + + * **`Filesystem UUID:`** UUID stands for Universally Unique Identifier, UUIDs are used to identify block devices in Linux. It's 128 bit long numbers represented by 32 hexadecimal digits. + * **`Superblock:`** Superblock stores metadata of the file system. If the superblock of a file system is corrupted, then the filesystem cannot be mounted and thus files cannot be accessed. + * **`Inode:`** An inode is a data structure on a filesystem on a Unix-like operating system that stores all the information about a file except its name and its actual data. + * **`Journal:`** A journaling filesystem is a filesystem that maintains a special file called a journal that is used to repair any inconsistencies that occur as the result of an improper shutdown of a computer. + + + +### How To Mount A Partition In Linux + +Once you have created the partition and filesystem then we need to mount the partition to use. + +To do so, we need to create a mountpoint to mount the partition. Use mkdir command to create a mountpoint. + +``` +$ sudo mkdir -p /mnt/2g-new +``` + +For temporary mount, use the following command. You will be lose this mountpoint after rebooting your system. + +``` +$ sudo mount /dev/sdc1 /mnt/2g-new +``` + +For permanent mount, add the partition details in the fstab file. It can be done in two ways either adding device name or UUID value. + +Permanent mount using Device Name: + +``` +# vi /etc/fstab + +/dev/sdc1 /mnt/2g-new ext4 defaults 0 0 +``` + +Permanent mount using UUID Value. To get a UUID of the partition use blkid command. + +``` +$ sudo blkid +/dev/sdc1: UUID="d17e3c31-e2c9-4f11-809c-94a549bc43b7" TYPE="ext2" PARTUUID="8cc8f9e5-01" +/dev/sda1: UUID="d92fa769-e00f-4fd7-b6ed-ecf7224af7fa" TYPE="ext4" PARTUUID="eab59449-01" +/dev/sdc3: UUID="ca307aa4-0866-49b1-8184-004025789e63" TYPE="ext4" PARTUUID="8cc8f9e5-03" +/dev/sdc5: PARTUUID="8cc8f9e5-05" + +# vi /etc/fstab + +UUID=d17e3c31-e2c9-4f11-809c-94a549bc43b7 /mnt/2g-new ext4 defaults 0 0 +``` + +The same has been verified using df Command. + +``` +$ df -h +Filesystem Size Used Avail Use% Mounted on +udev 969M 0 969M 0% /dev +tmpfs 200M 7.0M 193M 4% /run +/dev/sda1 20G 16G 3.0G 85% / +tmpfs 997M 0 997M 0% /dev/shm +tmpfs 5.0M 4.0K 5.0M 1% /run/lock +tmpfs 997M 0 997M 0% /sys/fs/cgroup +tmpfs 200M 28K 200M 1% /run/user/121 +tmpfs 200M 25M 176M 13% /run/user/1000 +/dev/sdc1 1008M 1.3M 956M 1% /mnt/2g-new +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-fdisk-command-to-manage-disk-partitions/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/how-to-manage-disk-partitions-using-parted-command/ +[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[3]: https://www.2daygeek.com/wp-content/uploads/2019/01/linux-fdisk-command-to-manage-disk-partitions-1a.png From 8e85962146fbdc9eb5a21ff0d910ef237a6e5043 Mon Sep 17 00:00:00 2001 From: darksun Date: Thu, 31 Jan 2019 10:17:20 +0800 Subject: [PATCH 103/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190128=20Top=20?= =?UTF-8?q?Hex=20Editors=20for=20Linux=20sources/tech/20190128=20Top=20Hex?= =?UTF-8?q?=20Editors=20for=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190128 Top Hex Editors for Linux.md | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 sources/tech/20190128 Top Hex Editors for Linux.md diff --git a/sources/tech/20190128 Top Hex Editors for Linux.md b/sources/tech/20190128 Top Hex Editors for Linux.md new file mode 100644 index 0000000000..5cd47704b4 --- /dev/null +++ b/sources/tech/20190128 Top Hex Editors for Linux.md @@ -0,0 +1,146 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Top Hex Editors for Linux) +[#]: via: (https://itsfoss.com/hex-editors-linux) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Top Hex Editors for Linux +====== + +Hex editor lets you view/edit the binary data of a file – which is in the form of “hexadecimal” values and hence the name “Hex” editor. Let’s be frank, not everyone needs it. Only a specific group of users who have to deal with the binary data use it. + +If you have no idea, what it is, let me give you an example. Suppose, you have the configuration files of a game, you can open them using a hex editor and change certain values to have more ammo/score and so on. To know more about Hex editors, you should start with the [Wikipedia page][1]. + +In case you already know what’s it used for – let us take a look at the best Hex editors available for Linux. + +### 5 Best Hex Editors Available + +![Best Hex Editors for Linux][2] + +**Note:** The hex editors mentioned are in no particular order of ranking. + +#### 1\. Bless Hex Editor + +![bless hex editor][3] + +**Key Features** : + + * Raw disk editing + * Multilevel undo/redo operations. + * Multiple tabs + * Conversion table + * Plugin support to extend the functionality + + + +Bless is one of the most popular Hex editor available for Linux. You can find it listed in your AppCenter or Software Center. If that is not the case, you can check out their [GitHub page][4] for the build and the instructions associated. + +It can easily handle editing big files without slowing down – so it’s a fast hex editor. + +#### 2\. GNOME Hex Editor + +![gnome hex editor][5] + +**Key Features:** + + * View/Edit in either Hex/Ascii + + * Edit large files + + * + + +Yet another amazing Hex editor – specifically tailored for GNOME. Well, I personally use Elementary OS, so I find it listed in the App Center. You should find it in the Software Center as well. If not, refer to the [GitHub page][6] for the source. + +You can use this editor to view/edit in either hex or ASCII. The user interface is quite simple – as you can see in the image above. + +#### 3\. Okteta + +![okteta][7] + +**Key Features:** + + * Customizable data views + * Multiple tabs + * Character encodings: All 8-bit encodings as supplied by Qt, EBCDIC + * Decoding table listing common simple data types. + + + +Okteta is a simple hex editor with not so fancy features. Although it can handle most of the tasks. There’s a separate module of it which you can use to embed this in other programs to view/edit files. + +Similar to all the above-mentioned editors, you can find this listed on your AppCenter and Software center as well. + +#### 4\. wxHexEditor + +![wxhexeditor][8] + +**Key Features:** + + * Easily handle big files + * Has x86 disassembly support + * **** Sector Indication **** on Disk devices + * Supports customizable hex panel formatting and colors. + + + +This is something interesting. It is primarily a Hex editor but you can also use it as a low level disk editor. For example, if you have a problem with your HDD, you can use this editor to edit the the sectors in raw hex and fix it. + +You can find it listed on your App Center and Software Center. If not, [Sourceforge][9] is the way to go. + +#### 5\. Hexedit (Command Line) + +![hexedit][10] + +**Key Features** : + + * Works via terminal + * It’s fast and simple + + + +If you want something to work on your terminal, you can go ahead and install Hexedit via the console. It’s my favorite Linux hex editor in command line. + +When you launch it, you will have to specify the location of the file, and it’ll then open it for you. + +To install it, just type in: + +``` +sudo apt install hexedit +``` + +### Wrapping Up + +Hex editors could come in handy to experiment and learn. If you are someone experienced, you should opt for the one with more feature – with a GUI. Although, it all comes down to personal preferences. + +What do you think about the usefulness of Hex editors? Which one do you use? Did we miss listing your favorite? Let us know in the comments! + +![][11] + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/hex-editors-linux + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Hex_editor +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/Linux-hex-editors-800x450.jpeg?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/bless-hex-editor.jpg?ssl=1 +[4]: https://github.com/bwrsandman/Bless +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/ghex-hex-editor.jpg?ssl=1 +[6]: https://github.com/GNOME/ghex +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/okteta-hex-editor-800x466.jpg?resize=800%2C466&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/wxhexeditor.jpg?ssl=1 +[9]: https://sourceforge.net/projects/wxhexeditor/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/hexedit-console.jpg?resize=800%2C566&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/Linux-hex-editors.jpeg?fit=800%2C450&ssl=1 From 6f30e87f847856c8406df4094ce16a62149c2e0e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 31 Jan 2019 10:24:24 +0800 Subject: [PATCH 104/164] translated --- ...nk, an open source personal finance app.md | 61 ------------------- ...nk, an open source personal finance app.md | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 61 deletions(-) delete mode 100644 sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md create mode 100644 translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md diff --git a/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md b/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md deleted file mode 100644 index a925448cfb..0000000000 --- a/sources/tech/20190120 Get started with HomeBank, an open source personal finance app.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get started with HomeBank, an open source personal finance app) -[#]: via: (https://opensource.com/article/19/1/productivity-tools-homebank) -[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) - -Get started with HomeBank, an open source personal finance app -====== -Keep track of where your money is going with HomeBank, the eighth in our series on open source tools that will make you more productive in 2019. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1) - -There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. - -Here's the eighth of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. - -### HomeBank - -Managing my finances can be really stressful. I don't look at my bank balance every day and sometimes have trouble keeping track of where my money is going. I often spend more time managing my finances than I need to, digging into accounts and payment histories to figure out where my money went. Knowing my finances are OK helps keep me calm and allows me to focus on other things. - -![](https://opensource.com/sites/default/files/uploads/homebank-1.png) - -[HomeBank][1] is a personal finance desktop application that helps decrease this type of stress by making it fairly easy to keep track of your finances. It has some nice reports to help you figure out where you're spending your money, allows you to set up rules for importing transactions, and supports most modern formats. - -HomeBank is available on most distributions by default, so installation is very easy. When you start it up for the first time, it will walk you through setup and allow you to create an account. From there, you can either import one of the supported file formats or start entering transactions. The transaction register itself is just that—a list of transactions. [Unlike some other apps][2], you don't have to learn [double-entry bookkeeping][3] to use HomeBank. - -![](https://opensource.com/sites/default/files/uploads/homebank-2.png) - -Importing files from your bank is handled with another step-by-step wizard, with options to create a new account or populate an existing one. Importing into a new account saves a little time since you don't have to pre-create all the accounts before starting the import. You can also import multiple files into an account at once, so you don't need to repeat the same steps for every file in every account. - -![](https://opensource.com/sites/default/files/uploads/homebank-3.png) - -The one pain point I've had with importing and managing accounts is category assignment. Categories are what allow you to break down your spending and see what you are spending money on, in general terms. HomeBank, unlike commercial services (and some commercial programs), requires you to manually set up all the assignments. But this is generally a one-time thing, and then the categories can be auto-applied as transactions are added/imported. There is also a button to analyze the account and auto-apply things that already exist, which speeds up categorizing a large import (like I did the first time). HomeBank comes with a large number of categories you can start with, and you can add your own as well. - -HomeBank also has budgeting features, allowing you to plan for the months ahead. - -![](https://opensource.com/sites/default/files/uploads/homebank-4.png) - -The big win, for me, is HomeBank's reports feature. Not only is there a chart on the main screen showing where you are spending your money, but there are a whole host of other reports you can look at. If you use the budget feature, there is a report that tracks your spending against your budget. You can also view those reports as pie and bar charts. There is also a trend report and a balance report, so you can look back and see changes or patterns over time. - -Overall, HomeBank is a very friendly, useful application to help you keep your finances in order. It is simple to use and really helpful if keeping track of your money is a major stress point in your life. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/productivity-tools-homebank - -作者:[Kevin Sonney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ksonney (Kevin Sonney) -[b]: https://github.com/lujun9972 -[1]: http://homebank.free.fr/en/index.php -[2]: https://www.gnucash.org/ -[3]: https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system diff --git a/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md b/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md new file mode 100644 index 0000000000..d124db94c0 --- /dev/null +++ b/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md @@ -0,0 +1,61 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with HomeBank, an open source personal finance app) +[#]: via: (https://opensource.com/article/19/1/productivity-tools-homebank) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +开始使用 HomeBank,一个开源个人财务应用 +====== +使用 HomeBank 跟踪你的资金流向,这是我们开源工具系列中的第八个工具,它将在 2019 年提高你的工作效率。 +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1) + +每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。 + +这是我挑选出的 19 个新的(或者对你而言新的)开源项目来帮助你在 2019 年更有效率。 + +### HomeBank + +管理我的财务可能会很有压力。我不会每天查看我的银行余额,有时也很难跟踪我的钱流向哪里。我经常会花更多的时间来管理我的财务,挖掘账户和付款历史并找出我的钱去了哪里。了解我的财务状况可以帮助我保持冷静,并让我专注于其他事情。 + +![](https://opensource.com/sites/default/files/uploads/homebank-1.png) + +[HomeBank][1] 是一款个人财务桌面应用,帮助你轻松跟踪你的财务状况,来帮助减少此类压力。它有很好的报告可以帮助你找出你花钱的地方,允许你设置导入交易的规则,并支持大多数现代格式。 + +HomeBank 默认可在大多数发行版上可用,因此安装它非常简单。当你第一次启动它时,它将引导你完成设置并让你创建一个帐户。之后,你可以导入任意一种支持的文件格式或开始输入交易。交易簿本身就是一个交易列表。 [与其他一些应用不同][2],你不必学习[复式簿记][3]来使用 HomeBank。 + +![](https://opensource.com/sites/default/files/uploads/homebank-2.png) + +从银行导入文件将使用另一个分步向导进行处理,该向导提供了创建新帐户或填充现有帐户的选项。导入新帐户可节省一点时间,因为你无需在开始导入之前预先创建所有帐户。你还可以一次将多个文件导入帐户,因此不需要对每个帐户中的每个文件重复相同的步骤。 + +![](https://opensource.com/sites/default/files/uploads/homebank-3.png) + +我在导入和管理帐户时遇到的一个痛点是指定类别。一般而言,类别可以让你分解你的支出,看看你花钱的方式。HomeBank 与一些商业服务(以及一些商业程序)不同,它要求你手动设置所有类别。但这通常是一次性的事情,它可以在添加/导入交易时自动添加类别。还有一个按钮来分析帐户并跳过已存在的内容,这样可以加快对大量导入的分类(就像我第一次做的那样)。HomeBank 提供了大量可用的类别,你也可以添加自己的类别。 + +HomeBank 还有预算功能,允许你计划未来几个月的开销。 + +![](https://opensource.com/sites/default/files/uploads/homebank-4.png) + +对我来说,最棒的功能是 HomeBank 的报告。主页面上不仅有一个图表显示你花钱的地方,而且还有许多其他报告可供你查看。如果你使用预算功能,还会有一份报告会根据预算跟踪你的支出情况。你还可以以饼图和条形图的方式查看报告。它还有趋势报告和余额报告,因此你可以回顾并查看一段时间内的变化或模式。 + +总的来说,HomeBank 是一个非常友好,有用的程序,可以帮助你保持良好的财务。如果跟踪你的钱是你生活中的一件麻烦事,它使用起来很简单并且非常有用。 + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tools-homebank + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: http://homebank.free.fr/en/index.php +[2]: https://www.gnucash.org/ +[3]: https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system \ No newline at end of file From 1bca7924f63db7f1d5b1d87fac3fba4e75442434 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 31 Jan 2019 10:28:41 +0800 Subject: [PATCH 105/164] translating --- ...with Roland, a random selection tool for the command line.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md b/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md index 1bfeb92c0c..edf787447b 100644 --- a/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md +++ b/sources/tech/20190119 Get started with Roland, a random selection tool for the command line.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b0aad8e5b3517b64ecc339dc61760cc684f53b1b Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Thu, 31 Jan 2019 14:32:48 +0800 Subject: [PATCH 106/164] hankchow translated --- ...24 Understanding Angle Brackets in Bash.md | 154 ------------------ ...24 Understanding Angle Brackets in Bash.md | 151 +++++++++++++++++ 2 files changed, 151 insertions(+), 154 deletions(-) delete mode 100644 sources/tech/20190124 Understanding Angle Brackets in Bash.md create mode 100644 translated/tech/20190124 Understanding Angle Brackets in Bash.md diff --git a/sources/tech/20190124 Understanding Angle Brackets in Bash.md b/sources/tech/20190124 Understanding Angle Brackets in Bash.md deleted file mode 100644 index 063eec3fd0..0000000000 --- a/sources/tech/20190124 Understanding Angle Brackets in Bash.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (HankChow) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understanding Angle Brackets in Bash) -[#]: via: (https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash) -[#]: author: (Paul Brown https://www.linux.com/users/bro66) - -Understanding Angle Brackets in Bash -====== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/architecture-1839450_1920.jpg?itok=ra6XonD3) - -[Bash][1] provides many important built-in commands, like `ls`, `cd`, and `mv`, as well as regular tools such as `grep`, `awk,` and `sed`. But, it is equally important to know the punctuation marks -- [the glue in the shape of dots][2], commas, brackets. and quotes -- that allow you to transform and push data from one place to another. Take angle brackets (`< >`), for example. - -### Pushing Around - -If you are familiar with other programming and scripting languages, you may have used `<` and `>` as logical operators to check in a condition whether one value is larger or smaller than another. If you have ever written HTML, you have used angle brackets to enclose tags. - -In shell scripting, you can also use brackets to push data from place to place, for example, to a file: - -``` -ls > dir_content.txt -``` - -In this example, instead of showing the contents of the directory on the command line, `>` tells the shell to copy it into a file called _dir_content.txt_. If _dir_content.txt_ doesn't exist, Bash will create it for you, but if _dir_content.txt_ already exists and is not empty, you will overwrite whatever it contained, so be careful! - -You can avoid overwriting existing content by tacking the new stuff onto the end of the old stuff. For that you use `>>` (instead of `>`): - -``` -ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt -``` - -This line stores the list of contents of your home directory into _dir_content.txt_. You then count the number of lines in _dir_content.txt_ (which gives you the number of items in the directory) with [`wc -l`][3] and you tack that value onto the end of the file. - -After running the command line on my machine, this is what my _dir_content.txt_ file looks like: - -``` -Applications -bin -cloud -Desktop -Documents -Downloads -Games -ISOs -lib -logs -Music -OpenSCAD -Pictures -Public -Templates -test_dir -Videos -17 dir_content.txt -``` - -The mnemonic here is to look at `>` and `>>` as arrows. In fact, the arrows can point the other way, too. Say you have a file called _CBActors_ containing some names of actors and the number of films by the Coen brothers they have been in. Something like this: - -``` -John Goodman 5 -John Turturro 3 -George Clooney 2 -Frances McDormand 6 -Steve Buscemi 5 -Jon Polito 4 -Tony Shalhoub 3 -James Gandolfini 1 -``` - -Something like - -``` -sort < CBActors # Do this -Frances McDormand 6 # And you get this -George Clooney 2 -James Gandolfini 1 -John Goodman 5 -John Turturro 3 -Jon Polito 4 -Steve Buscemi 5 -Tony Shalhoub 3 -``` - -Will [sort][4] the list alphabetically. But then again, you don't need `<` here since `sort` already expects a file anyway, so `sort CBActors` will work just as well. - -However, if you need to see who is the Coens' favorite actor, you can check with : - -``` -while read name surname films; do echo $films $name $surname > filmsfirst.txt; done < CBActors -``` - -Or, to make that a bit more readable: - -``` -while read name surname films;\ - do - echo $films $name $surname >> filmsfirst;\ - done < CBActors -``` - -Let's break this down, shall we? - - * the [`while ...; do ... done`][5] structure is a loop. The instructions between `do` and `done` are repeatedly executed while a condition is met, in this case... - * ... the [`read`][6] instruction has lines to read. `read` reads from the standard input and will continue reading until there is nothing more to read... - * ... And as standard input is fed in via `<` and comes from _CBActors_ , that means the `while` loop will loop until the last line of _CBActors_ is piped into the loop. - * Getting back to `read` for a sec, the tool is clever enough to see that there are three distinct fields separated by spaces on each line of the file. That allows you to put the first field from each line in the `name` variable, the second in `surname` and the third in `films`. This comes in handy later, on the line that says `echo $films $name $surname >> filmsfirst;\`, allowing you to reorder the fields and push them into a file called _filmsfirst_. - - - -At the end of all that, you have a file called _filmsfirst_ that looks like this: - -``` -5 John Goodman -3 John Turturro -2 George Clooney -6 Frances McDormand -5 Steve Buscemi -4 Jon Polito -3 Tony Shalhoub -1 James Gandolfini -``` - -which you can now use with `sort`: - -``` -sort -r filmsfirst -``` - -to see who is the Coens' favorite actor. Yes, it is Frances McDormand. (The [`-r`][4] option reverses the sort, so McDormand ends up on top). - -We'll look at more angles on this topic next time! - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash - -作者:[Paul Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/bro66 -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/blog/2019/1/bash-shell-utility-reaches-50-milestone -[2]: https://www.linux.com/blog/learn/2019/1/linux-tools-meaning-dot -[3]: https://linux.die.net/man/1/wc -[4]: https://linux.die.net/man/1/sort -[5]: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html -[6]: https://linux.die.net/man/2/read diff --git a/translated/tech/20190124 Understanding Angle Brackets in Bash.md b/translated/tech/20190124 Understanding Angle Brackets in Bash.md new file mode 100644 index 0000000000..7e2ed95182 --- /dev/null +++ b/translated/tech/20190124 Understanding Angle Brackets in Bash.md @@ -0,0 +1,151 @@ +[#]: collector: (lujun9972) +[#]: translator: (HankChow) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Understanding Angle Brackets in Bash) +[#]: via: (https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash) +[#]: author: (Paul Brown https://www.linux.com/users/bro66) + +理解 Bash 中的尖括号 +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/architecture-1839450_1920.jpg?itok=ra6XonD3) + +[Bash][1] 内置了很多诸如 `ls`、`cd`、`mv` 这样的重要的命令,也有很多诸如 `grep`、`awk`、`sed` 这些有用的工具。但除此之外,其实 [Bash][1] 中还有很多可以[起到胶水作用][2]的标点符号,例如点号(`.`)、逗号(`,`)、括号(`<>`)、引号(`"`)之类。下面我们就来看一下可以用来进行数据转换和转移的尖括号()。 + +### 转移数据 + +如果你对其它编程语言有所了解,你会知道尖括号 `<` 和 `>` 一般是作为逻辑运算符,用来比较两个值之间的大小关系。如果你还编写 HTML,尖括号作为各种标签的一部分,就更不会让你感到陌生了。 + +在 shell 脚本语言中,尖括号可以将数据从一个地方转移到另一个地方。例如可以这样把数据存放到一个文件当中: + +``` +ls > dir_content.txt +``` + +在上面的例子中,`>` 符号让 shell 将 `ls` 命令的输出结果写入到 `dir_content.txt` 里,而不是直接显示在命令行中。需要注意的是,如果 `dir_content.txt` 这个文件不存在,Bash 会为你创建出来;但是如果 `dir_content.txt` 是一个已有得非空文件,它的内容就会被覆盖掉。所以执行类似的操作之前务必谨慎。 + +你也可以不使用 `>` 而使用 `>>`,这样就可以把新的数据追加到文件的末端而不会覆盖掉文件中已有的数据了。例如: + +``` +ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt +``` + +在这串命令里,首先将 home 目录的内容写入到 `dir_content.txt` 文件中,然后使用 `wc -l` 计算出 `dir_content.txt` 文件的行数(也就是 home 目录中的文件数)并追加到 `dir_content.txt` 的末尾。 + +在我的机器上执行上述命令之后,`dir_content.txt` 的内容会是以下这样: + +``` +Applications +bin +cloud +Desktop +Documents +Downloads +Games +ISOs +lib +logs +Music +OpenSCAD +Pictures +Public +Templates +test_dir +Videos +17 dir_content.txt +``` + +你可以将 `>` 和 `>>` 作为箭头来理解。当然,这个箭头的指向也可以反过来。例如,Coen brothers 的一些演员以及他们出演电影的次数保存在 `CBActors` 文件中,就像这样: + +``` +John Goodman 5 +John Turturro 3 +George Clooney 2 +Frances McDormand 6 +Steve Buscemi 5 +Jon Polito 4 +Tony Shalhoub 3 +James Gandolfini 1 +``` + +你可以执行这样的命令: + +``` +sort < CBActors +Frances McDormand 6 # 你会得到这样的输出 +George Clooney 2 +James Gandolfini 1 +John Goodman 5 +John Turturro 3 +Jon Polito 4 +Steve Buscemi 5 +Tony Shalhoub 3 +``` + +就可以使用 [`sort`][4] 命令将这个列表按照字母顺序输出。但是,`sort` 命令本来就可以接受传入一个文件,因此在这里使用 `<` 会略显多余,直接执行 `sort CBActors` 就可以得到期望的结果。 + +如果你想知道 Coens 最喜欢的演员是谁,你可以这样操作。首先: + +``` +while read name surname films; do echo $films $name $surname > filmsfirst.txt; done < CBActors +``` + +上面这串命令写在多行中可能会比较易读: + +``` +while read name surname films;\ + do + echo $films $name $surname >> filmsfirst;\ + done < CBActors +``` + +下面来分析一下这些命令做了什么: + + * [`while ...; do ... done`][5] 是一个循环结构。当 `while` 后面的条件成立时,`do` 和 `done` 之间的部分会一直重复执行; + * [`read`][6] 语句会按行读入内容。`read` 会从标准输入中持续读入,直到没有内容可读入; + * `CBActors` 文件的内容会通过 `<` 从标准输入中读入,因此 `while` 循环会将 `CBActors` 文件逐行完整读入; + * `read` 命令可以按照空格将每一行内容划分为三个字段,然后分别将这三个字段赋值给 `name`、`surname` 和 `films` 三个变量,这样就可以很方便地通过 `echo $films $name $surname >> filmsfirst;\` 来重新排列几个字段的放置顺序并存放到 `filmfirst` 文件里面了。 + +执行完以后,查看 `filmsfirst` 文件,内容会是这样的: + +``` +5 John Goodman +3 John Turturro +2 George Clooney +6 Frances McDormand +5 Steve Buscemi +4 Jon Polito +3 Tony Shalhoub +1 James Gandolfini +``` + +这时候再使用 `sort` 命令: + +``` +sort -r filmsfirst +``` + +就可以看到 Coens 最喜欢的演员是 Frances McDormand 了。(`-r` 参数表示降序排列,因此 McDormand 会排在最前面) + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash + +作者:[Paul Brown][a] +选题:[lujun9972][b] +译者:[HankChow](https://github.com/HankChow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/bro66 +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/blog/2019/1/bash-shell-utility-reaches-50-milestone +[2]: https://www.linux.com/blog/learn/2019/1/linux-tools-meaning-dot +[3]: https://linux.die.net/man/1/wc +[4]: https://linux.die.net/man/1/sort +[5]: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html +[6]: https://linux.die.net/man/2/read + From 6bf9dcc001232dd10c0ebb44d88247a00c5bf56f Mon Sep 17 00:00:00 2001 From: MjSeven Date: Wed, 30 Jan 2019 23:48:30 +0800 Subject: [PATCH 107/164] Translating by MjSeven --- ... A Package Is Available On Your Linux Distribution Or Not.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md b/sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md index b731465a55..f1390faab0 100644 --- a/sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md +++ b/sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md @@ -1,3 +1,5 @@ +Translating by MjSeven + How To Search If A Package Is Available On Your Linux Distribution Or Not ====== You can directly install the require package which you want if you know the package name. From f142e62ae4baff70dd01eaea01077dbd728fa5aa Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 21:42:35 +0800 Subject: [PATCH 108/164] PRF:20190123 Getting started with Isotope, an open source webmail client.md @MjSeven --- ... Isotope, an open source webmail client.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md b/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md index 0598fc8963..2f8be92851 100644 --- a/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md +++ b/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md @@ -1,43 +1,42 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Getting started with Isotope, an open source webmail client) [#]: via: (https://opensource.com/article/19/1/productivity-tool-isotope) [#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) - -Isotope 入门:一个开源的 Web 邮件客户端 +开始使用 Isotope 吧,一款开源的 Web 邮件客户端 ====== -使用 Isotope(一个轻量级的电子邮件客户端)阅读富文本电子邮件,它是我们在开源工具系列的第 11 个,将使你在 2019 年更高效。 + +> 使用轻量级的电子邮件客户端 Isotope 阅读富文本电子邮件,这个开源工具系列的第十一个工具将使你在 2019 年更高效。 ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/newsletter_email_mail_web_browser.jpg?itok=Lo91H9UH) -在每年的年初,似乎都有一股疯狂的寻找提高工作效率方法的冲动。新年决心,渴望以正确的方式开始新的一年。当然,“旧不去的,新的不来”的态度都会导致这种情况。一般的建议都偏向于私有和专业软件,然而并不是必须这样。 +在每年的年初,似乎都有一股疯狂的寻找提高工作效率方法的冲动。新年决心,渴望以正确的方式开始新的一年。当然,“旧不去的,新的不来”的态度都会导致这种情况。一般的建议都偏向于闭源和专有软件,然而并不是必须这样。 以下是我挑选的 19 个新的(或者对你来说是新的)开源工具中的第 11 个,它将帮助你在 2019 年提高工作效率。 ### Isotope -正如我们在[本系列的第四篇文章][1](关于 Cypht)中所讨论的那样,我们花了很多时间来处理电子邮件。有很多方法可以解决它,我已经花了很多时间来寻找最适合我的电子邮件客户端。我认为这是一个重要的区别:对我有效的方法并不总是对其它人有效。有时对我有用的是像 [Thunderbird][2] 这样的完整客户端,有时是像 [Mutt][3] 这样的控制台客户端,有时是像 [Gmail][4] 和 [RoundCube][5] 这样基于 Web 的界面。 +正如我们在[本系列的第四篇文章][1](Cypht)中所讨论的那样,我们花了很多时间来处理电子邮件。有很多方法可以解决它,我已经花了很多时间来寻找最适合我的电子邮件客户端。我认为这是一个重要的区别:对我有效的方法并不总是对其它人有效。有时对我有用的是像 [Thunderbird][2] 这样的完整客户端,有时是像 [Mutt][3] 这样的控制台客户端,有时是像 [Gmail][4] 和 [RoundCube][5] 这样基于 Web 的界面。 ![](https://opensource.com/sites/default/files/uploads/isotope_1.png) -[Isotope][6] 是一个本地托管的,基于 Web 的电子邮件客户端。它非常轻巧,只使用 IMAP 协议,占用的磁盘空间非常小。与 Cypht 不同,Isotope 具有完整的 HTML 邮件支持,这意味着显示富文本电子邮件没有问题。 +[Isotope][6] 是一个本地托管的、基于 Web 的电子邮件客户端。它非常轻巧,只使用 IMAP 协议,占用的磁盘空间非常小。与 Cypht 不同,Isotope 具有完整的 HTML 邮件支持,这意味着显示富文本电子邮件没有问题。 ![](https://opensource.com/sites/default/files/uploads/isotope_2_0.png) -如果你安装了 [Docker][7],那么安装 Isotope 非常容易。你只需将文档中的命令复制到控制台中,然后按下 Enter 键。在浏览器中输入 **localhost** 来获取 Isotope 登录界面,输入你的 IMAP 服务器,登录名和密码将打开收件箱视图。 +如果你安装了 [Docker][7],那么安装 Isotope 非常容易。你只需将文档中的命令复制到控制台中,然后按下回车键。在浏览器中输入 `localhost` 来访问 Isotope 登录界面,输入你的 IMAP 服务器,登录名和密码将打开收件箱视图。 ![](https://opensource.com/sites/default/files/uploads/isotope_3.png) -在这一点上,Isotope 的功能和你想象的差不多。单击消息进行查看,单击铅笔图标以创建新邮件等。你会注意到用户界面(UI)非常简单,没有“移动到文件夹”,“复制到文件夹”和“存档”等常规按钮。你可以通过拖动来移动消息,因此无论如何你都不会错过这些按钮。 +在这一点上,Isotope 的功能和你想象的差不多。单击消息进行查看,单击铅笔图标以创建新邮件等。你会注意到用户界面(UI)非常简单,没有“移动到文件夹”、“复制到文件夹”和“存档”等常规按钮。你可以通过拖动来移动消息,因此其实你并不太需要这些按钮。 ![](https://opensource.com/sites/default/files/uploads/isotope_4.png) -总的来说,Isotope 干净,速度快,工作得非常好。更棒的是,它正在积极开发中(最近一次的提交是在我撰写本文的两小时之前),所以它正在不断得到改进。你可以查看代码并在 [GitHub][8] 上为它做出贡献。 - +总的来说,Isotope 干净、速度快、工作得非常好。更棒的是,它正在积极开发中(最近一次的提交是在我撰写本文的两小时之前),所以它正在不断得到改进。你可以查看代码并在 [GitHub][8] 上为它做出贡献。 -------------------------------------------------------------------------------- @@ -45,8 +44,8 @@ via: https://opensource.com/article/19/1/productivity-tool-isotope 作者:[Kevin Sonney][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 705dee23094348ce14f54628dd207d43272703d5 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 21:43:11 +0800 Subject: [PATCH 109/164] PUB:20190123 Getting started with Isotope, an open source webmail client.md @MjSeven https://linux.cn/article-10494-1.html --- ...ing started with Isotope, an open source webmail client.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190123 Getting started with Isotope, an open source webmail client.md (98%) diff --git a/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md b/published/20190123 Getting started with Isotope, an open source webmail client.md similarity index 98% rename from translated/tech/20190123 Getting started with Isotope, an open source webmail client.md rename to published/20190123 Getting started with Isotope, an open source webmail client.md index 2f8be92851..5397aad573 100644 --- a/translated/tech/20190123 Getting started with Isotope, an open source webmail client.md +++ b/published/20190123 Getting started with Isotope, an open source webmail client.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10494-1.html) [#]: subject: (Getting started with Isotope, an open source webmail client) [#]: via: (https://opensource.com/article/19/1/productivity-tool-isotope) [#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) From 9251382368ae0507c909f6bf0f3f04bd8693b4d8 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 21:52:08 +0800 Subject: [PATCH 110/164] PRF:20181207 Plan your own holiday calendar at the Linux command line.md @MjSeven --- ...iday calendar at the Linux command line.md | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md b/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md index 6d959d7339..30a529a1d3 100644 --- a/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md +++ b/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Plan your own holiday calendar at the Linux command line) @@ -9,16 +9,18 @@ 在 Linux 命令行中规划你的假期日历 ====== -将命令链接在一起,构建一个彩色日历,然后在暴风雪中将其拂去。 + +> 将命令链接在一起,构建一个彩色日历,然后在暴风雪中将其拂去。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-cal.png?itok=S0F8RY9k) 欢迎阅读今天推出的 Linux 命令行玩具降临日历。如果这是你第一次访问本系列,你可能会问:什么是命令行玩具。即使我不太确定,但一般来说,它可以是一个游戏或任何简单的娱乐,可以帮助你在终端玩得开心。 很可能你们中的一些人之前已经看过我们日历上的各种选择,但我们希望给每个人至少一件新东西。 -我们在没有创建实际日历的情况下完成了本系列的第 7 天,所以今天让我们使用命令行工具来做到这一点:**cal**。就其本身而言,**cal** 可能不是最令人惊奇的工具,但我们可以使用其它一些实用程序来为它增添一些趣味。 +我们在没有创建实际日历的情况下完成了本系列的第 7 天,所以今天让我们使用命令行工具来做到这一点:`cal`。就其本身而言,`cal` 可能不是最令人惊奇的工具,但我们可以使用其它一些实用程序来为它增添一些趣味。 -很可能,你的系统上已经安装了 **cal**。要使用它,只需要输入 **cal** 即可。 +很可能,你的系统上已经安装了 `cal`。要使用它,只需要输入 `cal` 即可。 ``` $ cal @@ -32,7 +34,7 @@ Su Mo Tu We Th Fr Sa 30 31           ``` -我们不打算在本文中深入介绍高级用法,因此如果你想了解有关 **cal** 的更多信息,查看 Opensouce.com 社区版主 Don Watkin 的优秀文章 [date 和 cal 命令概述][1]。 +我们不打算在本文中深入介绍高级用法,因此如果你想了解有关 `cal` 的更多信息,查看 Opensouce.com 社区版主 Don Watkin 的优秀文章 [date 和 cal 命令概述][1]。 现在,让我们用一个漂亮的盒子来为它增添趣味,就像我们在上一篇 Linux 玩具文章中介绍的那样。我将使用钻石块,用一点内边距来对齐。 @@ -61,7 +63,7 @@ $ cal | boxes -d diamonds -p a1l4t2         \/          \/          \/ ``` -看起来很不错,但是为了好的测量,让我们把整个东西放到另一个盒子里,为了好玩,这次我们将使用滚动设计。 +看起来很不错,但是为了更规整,让我们把整个东西放到另一个盒子里,为了好玩,这次我们将使用卷轴式设计。 ``` cal | boxes -d diamonds -p a1t2l3 | boxes -a c -d scroll         @@ -93,7 +95,7 @@ cal | boxes -d diamonds -p a1t2l3 | boxes -a c -d scroll            ~~~                                                ~~~ ``` -完美。现在,事情变得有点疯狂了。我喜欢我们的设计,但我想全力以赴,所以我要给它上色。但是 Opensource.com 员工所在的北卡罗来版纳州罗利办公室,本周末很有可能下雪。所以,让我们享受彩色降临日历,然后用雪擦掉它。 +完美。现在,这事有点小激动了。我喜欢我们的设计,但我想更妙一些,所以我要给它上色。但是 Opensource.com 员工所在的北卡罗来版纳州罗利办公室,本周末很有可能下雪。所以,让我们享受彩色降临日历,然后用雪擦掉它。 关于雪,我抓取了一些 Bash 和 Gawk 的漂亮[代码片段][2],幸亏我发现了 CLIMagic。如果你不熟悉 CLIMagic,去查看他们的[网站][3],在 [Twitter][4] 上关注他们。你会满意的。 @@ -107,7 +109,7 @@ $ clear;cal|boxes -d diamonds -p a1t2l3|boxes -a c -d scroll|lolcat;sleep 3;whil ![](https://opensource.com/sites/default/files/uploads/linux-toy-cal-animated.gif) -要使它在你的系统上工作,你需要所有它引用的实用程序(box, lolcat, gawk 等),还需要使用支持 Unicode 的终端仿真器。 +要使它在你的系统上工作,你需要所有它引用的实用程序(`box`、`lolcat`、`gawk` 等),还需要使用支持 Unicode 的终端仿真器。 你有特别喜欢的命令行小玩具需要我介绍的吗?这个系列要介绍的小玩具大部分已经有了落实,但还预留了几个空位置。请在评论区留言,我会查看的。如果还有空位置,我会考虑介绍它的。如果没有,但如果我得到了一些很好的意见,我会在最后做一些有价值的提及。 @@ -120,7 +122,7 @@ via: https://opensource.com/article/18/12/linux-toy-cal 作者:[Jason Baker][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ad03e06bc4b7c85a0588106f559ccd91f9cd689e Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 21:53:07 +0800 Subject: [PATCH 111/164] PUB:20181207 Plan your own holiday calendar at the Linux command line.md @MjSeven https://linux.cn/article-10495-1.html --- ...lan your own holiday calendar at the Linux command line.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181207 Plan your own holiday calendar at the Linux command line.md (99%) diff --git a/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md b/published/20181207 Plan your own holiday calendar at the Linux command line.md similarity index 99% rename from translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md rename to published/20181207 Plan your own holiday calendar at the Linux command line.md index 30a529a1d3..0a216f0d7b 100644 --- a/translated/tech/20181207 Plan your own holiday calendar at the Linux command line.md +++ b/published/20181207 Plan your own holiday calendar at the Linux command line.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10495-1.html) [#]: subject: (Plan your own holiday calendar at the Linux command line) [#]: via: (https://opensource.com/article/18/12/linux-toy-cal) [#]: author: (Jason Baker https://opensource.com/users/jason-baker) From afd552fab296606cf2ee915b2c2a7e86bdddb53b Mon Sep 17 00:00:00 2001 From: MjSeven Date: Thu, 31 Jan 2019 23:23:03 +0800 Subject: [PATCH 112/164] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90=20?= =?UTF-8?q?20180626?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lable On Your Linux Distribution Or Not.md | 101 ++++++++---------- 1 file changed, 44 insertions(+), 57 deletions(-) rename {sources => translated}/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md (68%) diff --git a/sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md b/translated/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md similarity index 68% rename from sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md rename to translated/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md index f1390faab0..4f6a2dbe35 100644 --- a/sources/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md +++ b/translated/tech/20180626 How To Search If A Package Is Available On Your Linux Distribution Or Not.md @@ -1,51 +1,46 @@ -Translating by MjSeven - -How To Search If A Package Is Available On Your Linux Distribution Or Not +如何搜索一个包是否在你的 Linux 发行版中 ====== -You can directly install the require package which you want if you know the package name. +如果你知道包名称,那么你可以直接安装所需的包。 -In some cases, if you don’t know the exact package name or you want to search some packages then you can easily search that package with help of distribution package manager. +在某些情况下,如果你不知道确切的包名称或者你想搜索某些包,那么你可以在分发包管理器的帮助下轻松搜索该包。 -Searches automatically include both installed and available packages. +自动搜索包括已安装和可用的包。 -The format of the results depends upon the option. If the query produces no information, there are no packages matching the criteria. +结果的格式取决于选项。如果查询没有生成任何信息,那么意味着没有匹配条件的包。 -This can be done through distribution package managers with variety of options. +这可以通过具有各种选项的分发包管理器来完成。 -I had added all the possible options in this article and you can select which is the best and suitable for you. +我已经在本文中添加了所有可能的选项,你可以选择最好的和最合适你的选项。 -Alternatively we can achieve this through **whohas** command. This will search the given package to all the major distributions (such as Debian, Ubuntu, Fedora, etc.,) not only your own system distribution. +或者,我们可以通过 **whohas** 命令实现这一点。它会从所有的主流发行版(例如 Debian, Ubuntu, Fedora 等)中搜索,而不仅仅是你自己的系统发行版。 -**Suggested Read :** -**(#)** [List of Command line Package Managers For Linux & Usage][1] -**(#)** [A Graphical frontend tool for Linux Package Manager][2] +**建议阅读:** +**(#)** [适用于 Linux 的命令行包管理器列表以及用法][1] +**(#)** [Linux 包管理器的图形前端工具][2] -### How to Search a Package in Debian/Ubuntu +### 如何在 Debian/Ubuntu 中搜索一个包 -We can use apt, apt-cache and aptitude package managers to find a given package on Debian based distributions. I had included vast of options with this package managers. +我们可以使用 apt, apt-cache 和 aptitude 包管理器在基于 Debian 的发行版上查找给定的包。我为这个包管理器中包括了大量的选项。 -We can done this on three ways in Debian based systems. +我们可以在基于 Debian 的系统中使用三种方式完成此操作。 - * apt command - * apt-cache command - * aptitude command + * apt 命令 + * apt-cache 命令 + * aptitude 命令 +### 如何使用 apt 命令搜索一个包 +APT 代表高级包管理工具 Advanced Packaging Tool(APT),它取代了 apt-get。它有功能丰富的命令行工具,包括所有功能包含在一个命令(APT)里,包括 apt-cache, apt-search, dpkg, apt-cdrom, apt-config, apt-key 等,还有其他几个独特的功能。 -### How to search a package using apt command - -APT stands for Advanced Packaging Tool (APT) which is replacement for apt-get. It’s feature rich command-line tools with included all the futures in one command (APT) such as apt-cache, apt-search, dpkg, apt-cdrom, apt-config, apt-key, etc..,. and several other unique features. - -APT is a powerful command-line tool for installing, downloading, removing, searching and managing as well as querying information about packages as a low-level access to all features of the libapt-pkg library. It’s contains some less used command-line utilities related to package management. +APT 是一个强大的命令行工具,它可以访问 libapt-pkg 底层库的所有特性,它可以用于安装,下载,删除,搜索和管理以及查询关于包的信息,另外它还包含一些较少使用的与包管理相关的命令行实用程序。 ``` $ apt -q list nano vlc Listing... nano/artful,now 2.8.6-3 amd64 [installed] vlc/artful 2.2.6-6 amd64 - ``` -Alternatively we can search a given package using below format. +或者,我们可以使用以下格式搜索指定的包。 ``` $ apt search ^vlc Sorting... Done @@ -70,9 +65,9 @@ vlc-plugin-base/artful 2.2.6-6 amd64 ``` -### How to search a package using apt-cache command +### 如何使用 apt-cache 命令搜索一个包 -apt-cache performs a variety of operations on APT’s package cache. Displays information about the given packages. apt-cache does not manipulate the state of the system but does provide operations to search and generate interesting output from the package metadata. +apt-cache 会在 APT 的包缓存上执行各种操作。它会显示有关指定包的信息。apt-cache 不会操纵系统的状态,但提供了从包的元数据中搜索和生成有趣输出的操作。 ``` $ apt-cache search nano | grep ^nano nano - small, friendly text editor inspired by Pico @@ -86,7 +81,7 @@ nanopolish - consensus caller for nanopore sequencing data ``` -Alternatively we can search a given package using below format. +或者,我们可以使用以下格式搜索指定的包。 ``` $ apt-cache policy vlc vlc: @@ -98,7 +93,7 @@ vlc: ``` -Alternatively we can search a given package using below format. +或者,我们可以使用以下格式搜索给定的包。 ``` $ apt-cache pkgnames vlc vlc-bin @@ -123,9 +118,9 @@ vlc-plugin-base ``` -### How to search a package using aptitude command +### 如何使用 aptitude 命令搜索一个包 -aptitude is a text-based interface to the Debian GNU/Linux package system. It allows the user to view the list of packages and to perform package management tasks such as installing, upgrading, and removing packages. Actions may be performed from a visual interface or from the command-line. +aptitude 一个基于文本的 Debian GNU/Linux 软件包系统的接口。它允许用户查看包列表,并执行包管理任务,例如安装,升级和删除包,它可以从可视化界面或命令行执行操作。 ``` $ aptitude search ^vlc p vlc - multimedia player and streamer @@ -168,9 +163,9 @@ p vlc-plugin-zvbi:i386 ``` -### How to Search a Package in RHEL/CentOS +### 如何在 RHEL/CentOS 中搜索一个包 -Yum (Yellowdog Updater Modified) is one of the package manager utility in Linux operating system. Yum command is used to install, update, search & remove packages on some Linux distributions based on RedHat. +Yum(Yellowdog Updater Modified)是 Linux 操作系统中的包管理器实用程序之一。Yum 命令用于在一些基于 RedHat 的 Linux 发行版上,它用来安装,更新,搜索和删除软件包。 ``` # yum search ftpd Loaded plugins: fastestmirror, refresh-packagekit, security @@ -189,15 +184,14 @@ vsftpd.x86_64 : Very Secure Ftp Daemon ``` -Alternatively we can search the same using below command. +或者,我们可以使用以下命令搜索相同内容。 ``` # yum list ftpd - ``` -### How to Search a Package in Fedora +### 如何在 Fedora 中搜索一个包 -DNF stands for Dandified yum. We can tell DNF, the next generation of yum package manager (Fork of Yum) using hawkey/libsolv library for backend. Aleš Kozumplík started working on DNF since Fedora 18 and its implemented/launched in Fedora 22 finally. +DNF 代表 Dandified yum。我们可以说 DNF 是下一代 yum 包管理器(Yum 的衍生),它使用 hawkey/libsolv 库作为底层。自从 Fedora 18 开始以及它最终在 Fedora 22 中实施以来,Aleš Kozumplík 就在开始研究 DNF。 ``` # dnf search ftpd Last metadata expiration check performed 0:42:28 ago on Tue Jun 9 22:52:44 2018. @@ -217,24 +211,22 @@ perl-ftpd.noarch : Secure, extensible and configurable Perl FTP server pure-ftpd.x86_64 : Lightweight, fast and secure FTP server pyftpdlib.noarch : Python FTP server library nordugrid-arc-gridftpd.x86_64 : ARC gridftp server - ``` -Alternatively we can search the same using below command. +或者,我们可以使用以下命令搜索相同的内容。 ``` # dnf list proftpd Failed to synchronize cache for repo 'heikoada-terminix', disabling. Last metadata expiration check: 0:08:02 ago on Tue 26 Jun 2018 04:30:05 PM IST. Available Packages proftpd.x86_64 - ``` -### How to Search a Package in Arch Linux +### 如何在 Arch Linux 中搜索一个包 -pacman stands for package manager utility (pacman). pacman is a command-line utility to install, build, remove and manage Arch Linux packages. pacman uses libalpm (Arch Linux Package Management (ALPM) library) as a back-end to perform all the actions. +pacman 代表包管理实用程序(pacman)。它是一个用于安装,构建,删除和管理 Arch Linux 软件包的命令行实用程序。pacman 使用 libalpm(Arch Linux Package Management(ALPM)库)作为底层来执行所有操作。 -In my case, i’m going to search chromium package. +在本例中,我将要搜索 chromium 包。 ``` # pacman -Ss chromium extra/chromium 48.0.2564.116-1 @@ -249,24 +241,22 @@ community/chromium-chromevox latest-1 community/fcitx-mozc 2.17.2313.102-1 Fcitx Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input) - ``` -By default `-s`‘s builtin ERE (Extended Regular Expressions) can cause a lot of unwanted results. Use the following format to match the package name only. +默认情况下,`-s` 选项内置 ERE(扩展正则表达式)会导致很多不需要的结果。使用以下格式会仅匹配包名称。 ``` # pacman -Ss '^chromium-' ``` -pkgfile is a tool for searching files from packages in the Arch Linux official repositories. +pkgfile 是一个用于在 Arch Linux 官方仓库的包中搜索文件的工具。 ``` # pkgfile chromium - ``` -### How to Search a Package in openSUSE +### 如何在 openSUSE 中搜索一个包 -Zypper is a command line package manager for suse & openSUSE distributions. It’s used to install, update, search & remove packages & manage repositories, perform various queries, and more. Zypper command-line interface to ZYpp system management library (libzypp). +Zypper 是 SUSE 和 openSUSE 发行版的命令行包管理器。它用于安装,更新,搜索和删除包以及管理仓库,执行各种查询等。Zypper 命令行接口到 ZYpp 系统管理库(libzypp)。 ``` # zypper search ftp or @@ -286,12 +276,11 @@ S | Name | Summary | Type | proftpd-sqlite | SQLite Module for ProFTPD | package | pure-ftpd | A Lightweight, Fast, and Secure FTP S-> | package | vsftpd | Very Secure FTP Daemon - Written from-> | package - ``` -### How to Search a Package using whohas command +### 如何使用 whohas 命令搜索一个包 -whohas command such a intelligent tools which search a given package to all the major distributions such as Debian, Ubuntu, Gentoo, Arch, AUR, Mandriva, Fedora, Fink, FreeBSD, NetBSD. +whohas 命令是一个智能工具,从所有主流发行版中搜索指定包,如 Debian, Ubuntu, Gentoo, Arch, AUR, Mandriva, Fedora, Fink, FreeBSD 和 NetBSD。 ``` $ whohas nano Mandriva nano-debug 2.3.1-1mdv2010.2.x http://sophie.zarb.org/rpms/0b33dc73bca710749ad14bbc3a67e15a @@ -308,10 +297,9 @@ Gentoo nano 9999 http://packages.gentoo.org/package/app-editors/nano Gentoo nano 9999 http://packages.gentoo.org/package/app-editors/nano Gentoo nano 2.9.8 http://packages.gentoo.org/package/app-editors/nano Gentoo nano 2.9.7 http://packages.gentoo.org/package/app-editors/nano - ``` -If you want to search a given package to only current distribution repository, use the below format. +如果你希望只从当前发行版仓库中搜索指定包,使用以下格式: ``` $ whohas -d Ubuntu vlc Ubuntu vlc 2.1.6-0ubuntu14.04 1M all http://packages.ubuntu.com/trusty/vlc @@ -330,7 +318,6 @@ Ubuntu browser-plugin-vlc 2.0.6-4 47K all http://packages.ubuntu.com/cosmic/brow Ubuntu libvlc-bin 2.2.6-6 27K all http://packages.ubuntu.com/artful/libvlc-bin Ubuntu libvlc-bin 3.0.1-3build1 17K all http://packages.ubuntu.com/bionic/libvlc-bin Ubuntu libvlc-bin 3.0.2-0ubuntu0.1 17K all http://packages.ubuntu.com/bionic-updates/libvlc-bin - ``` -------------------------------------------------------------------------------- @@ -339,7 +326,7 @@ via: https://www.2daygeek.com/how-to-search-if-a-package-is-available-on-your-li 作者:[Prakash Subramanian][a] 选题:[lujun9972](https://github.com/lujun9972) -译者:[译者ID](https://github.com/译者ID) +译者:[MjSeven](https://github.com/MjSeven) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2568015e470d4c92622ae773c963d54bd02d7292 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 23:27:17 +0800 Subject: [PATCH 113/164] PRF:20171222 10 keys to quick game development.md @XYenChi --- ...71222 10 keys to quick game development.md | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/translated/talk/20171222 10 keys to quick game development.md b/translated/talk/20171222 10 keys to quick game development.md index c41f66bfc7..54dbd9fb99 100644 --- a/translated/talk/20171222 10 keys to quick game development.md +++ b/translated/talk/20171222 10 keys to quick game development.md @@ -1,70 +1,71 @@ 快速开发游戏的十个关键 ====== + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb) -十月早些时候,Opensource.com赞助的 [Open Jam][1] 入职仪式为处于世界各地的团队设立了45个入口。这些队伍只有三天时间用开源软件制作出一个游戏来参与角逐,并 [取前三][2]。 +十月初,由 Opensource.com 赞助的首届 [Open Jam][1] 吸引了来自世界各地的团队的 45 个参赛项目。这些队伍只用了三天时间就用开源软件制作出一个游戏来参与角逐,[有三支队伍取得了胜利][2]。 -我们在大学为每一位愿意参与的人举办了我们自己的 Open Jam 活动。周末预留了计算机实验室教大家使用开源软件——游戏引擎:[Godot][3],音乐:[LMMS][4] ,2D画面: [GIMP][5] 和3D画面 [Blender][6] ——来创作游戏和相关组件。活动产出了三个游戏: [Loathsome][7], [Lost Artist][8], 和 [Paint Rider][9] (我做的)。 +我们在我们的大学为每一位愿意参与的人举办了我们自己的 Open Jam 活动。我们预留了周末的计算机实验室,并教大家使用开源软件来创建游戏和游戏素材:游戏引擎:[Godot][3]、音乐:[LMMS][4]、2D 素材:[GIMP][5]、3D 素材:[Blender][6]。我们的活动产出了三个游戏:[Loathsome][7]、[Lost Artist][8] 和 [Paint Rider][9](我做的)。 -总的说来,我从游戏创作和游戏开发中,学到了十课关于游戏引擎、代码和快速游戏开发。 +根据我在游戏开发和游戏开发方面的经验,这里有 10 条关于游戏引擎、编码和快速游戏开发的经验教训。 -## 1\. 限定规模 +## 1、限定规模 -很容易想要去做一个规模宏大的冒险游戏或者比拟你最喜欢的游戏的东西。追求高于游戏创作之外的东西可能很酷,如果你有体会,但不要高估自己拥有的时间。我欣赏游戏创作的一点是强制你快速将一个游戏从概念阶段变成最终产品,因为你的时间非常有限。这也就是限定规模如此重要。 +很容易想要去做一个规模宏大的冒险游戏或者可以比拟你最喜欢的游戏的东西。如果你有一些经验,追求超乎游戏 Jam 活动的东西可能很酷,但不要高估自己拥有的时间。我欣赏游戏 Jam 活动的一点是它强制你快速将一个游戏从概念阶段变成最终产品,因为你的时间非常有限。这也就是限定规模如此重要的原因。 -Open Jam 的主题是“留下痕迹”,题目一出来,我和朋友就开始讨论什么样的游戏合题意。有个想法就是做玩家能在敌人身上留下伤痕的3D拳击游戏。我几乎没有做3D游戏的经验,我想做好的话,在我甚至还没发掘出可玩性之前,就得花太多时间在学习如何让痕迹合理和打击有效。 +这个 Open Jam 的主题是“留下痕迹”,题目一出来,我和朋友就开始讨论什么样的游戏适合该主题。一个想法就是做玩家能在敌人身上留下伤痕的 3D 拳击游戏。我几乎没有做 3D 游戏的经验,我想做好的话,在我甚至还没发掘出可玩性之前,就得花太多时间在学习如何让痕迹合理和打击有效。 -## 2\. 尽早可玩 +## 2、尽早可玩 -对游戏创作我最中肯的建议就是这。试着做出核心部件,快速写出代码,这样你就可以测试并决定它是否值得做成一个完整的游戏。不应该只剩几个小时截止了,才让你的游戏可玩。像 Open Jam 这样的三天创作,最好少花时间在实现概念上。 +这是我对游戏 Jam 活动最中肯的建议。试着做出核心机制,快速写出代码,这样你就可以测试并决定它是否值得做成一个完整的游戏。不应该只剩几个小时截止了,你的游戏才可玩。像 Open Jam 这样的三天的活动,不应该花费几个小时以上来做一个可以运行的演示。 -## 3\. 保持简单 +## 3、保持简单 -你想加入的每个特性都会延长整个开发时间。因为你不能迅速使之运行,所以无从得知提交一个新特性是否会消耗大量时间。街机风格的高分作品往往会在游戏创作中表现良好,它们天生就很简单。一旦核心部分完成,你可以开始加入特性并润色,无需担心最后游戏是否功能强大。 +你想加入的每个特性都会延长整个开发时间。因为你不能迅速使之运行,所以无从得知提交一个新特性是否会消耗大量时间。街机风格的高分作品往往会在游戏 Jam 活动中表现良好,它们天生就很简单。一旦核心部分完成,你可以开始加入特性并润色,无需担心最后游戏是否功能正常。 -## 4\. 从其他游戏获取灵感 +## 4、从其他游戏获取灵感 -可能你想做出完全原创的作品,但作品的原型极其有用。原型将节省重复劳动的时间,因为你已经知道什么有趣。告诉自己实践的经验越多,越容易做出包含自己想法的大型游戏,自然你也能从再创作其他人的作品中很好地练习。 +可能你想做出完全原创的作品,但有个可以基于它开发的原型极其有用。这将节省重复劳动的时间,因为你已经知道什么有趣。告诉自己实践的经验越多,越容易做出包含自己想法的大型游戏,所以你也能从再创作其他人的作品中得到很好地练习。 -考虑到 Open Jam 的“留下痕迹”主题,我觉得创作一个玩的时候可以留下颜料痕迹的游戏会很有趣,这样也可以看到你留下的标记。我记得这款老式动画游戏 [Line Rider 2 Beta][10] (后来叫 Paint Rider),而且知道玩的时候按住 Control 键可以画出痕迹的彩蛋。我简化了概念,甚至只需要一个按键来垂直移动。(更像老式飞机游戏)。大概一两个小时的创作,我有了基本模型,用一个按钮上下移动和留下小黑圈的痕迹。 +考虑到 Open Jam 的“留下痕迹”主题,我觉得创作一个玩的时候可以留下颜料痕迹的游戏会很有趣,这样也可以看到你留下的标记。我记得有款老式动画游戏 [Line Rider 2 Beta][10] (后来叫 Paint Rider),而且知道玩的时候按住 Control 键可以画出痕迹的彩蛋。我简化了这个概念,甚至只需要一个按键来垂直移动。(更像老式飞机游戏)。进入到 Jam 活动大概一两个小时后,我就有了基本模型,可以用一个按钮上下移动和留下小黑圈的痕迹。 -## 5\. 不要忽视可得性 +## 5、不要忽视可得性 -确保尽可能多的人能玩你的游戏。某个提交到 Open Jam 的游戏是虚拟现实游戏。尽管那很酷,但几乎没有人可以玩,因为拥有VR设备的人不多。所幸它的开发者并不期望取得好名次,只是想练手。但如果你想和人们分享你的游戏(或者赢得游戏创作),注意可得性是很重要的。 +确保尽可能多的人能玩你的游戏。某个提交到 Open Jam 的游戏是虚拟现实游戏。尽管那很酷,但几乎没有人可以玩,因为拥有 VR 设备的人不多。所幸它的开发者并不期望取得好名次,只是想练手。但如果你想和人们分享你的游戏(或者赢得游戏 Jam 活动),注意可得性是很重要的。 -Godot (和其他大多数游戏引擎)允许你在所有主流平台发布游戏。提交游戏时,特别是在 [Itch.io][11],有浏览器版本将支持大多数人玩。但尽你所能去发布在更多的平台和开放系统上。我甚至试着在移动端发布 Paint Rider ,但技术有限。 +Godot (和其他大多数游戏引擎)允许你在所有主流平台发布游戏。提交游戏时,特别是在 [Itch.io][11],有个浏览器版本就可以支持大多数人玩。但尽你所能去发布在更多的平台和操作系统上。我甚至试着在移动端发布 Paint Rider,但技术有限。 -## 6\. 不要做得太难 +## 6、不要做得太难 -如果游戏需要花费过多精力去学或者玩,你将失去一部分玩家。这照应了保持简单和限定规模,在游戏计划阶段非常重要。再次重申,想做一个宏大的游戏花上十天半个月开发很容易;难的是做出好玩、简单的游戏。 +如果游戏需要花费过多精力去学或者玩,你将失去一部分玩家。要保持简单和限定规模,这在游戏计划阶段非常重要。再次重申,想出一个需要花上十天半个月开发的宏大的游戏创意很容易;难的是做出好玩、简单的游戏。 -给妈妈介绍了 Paint Rider 之后,她很快开始玩起来,我认为不需要跟她说明更多。 +给我的妈妈介绍了 Paint Rider 之后,她很快开始玩起来,我认为不需要跟她说明更多。 -## 7\. 不用太整洁 +## 7、不用太整洁 -如果你习惯于花时间在设计每处图案和确保代码可复用、可适应,试着放松一点。如果你花太多时间考虑设计,当你最后到了可以玩游戏的时候,你可能发现游戏不是很有趣,那时候就来不及修改了。 +如果你习惯于花时间在设计模式上和确保代码可复用、可适应,试着放松一点。如果你花太多时间考虑设计,当你最后到了可以玩游戏的时候,你可能发现游戏不是很有趣,那时候就来不及修改了。 -这过程也适用于简化更严格的游戏:快速码出验证概念性展示模型直到找出值得做成完整游戏的,然后你潜心建立完美的代码基础来支持它。游戏创作的开发游戏就像快速码出可验证的理念。 +这过程也适用于简化更严格的游戏:快速码出验证概念性展示模型,直到找出值得做成完整游戏的,然后你可以潜心建立完美的代码来支持它。为游戏 Jame 活动创作的游戏就像是个快速开发一个可验证的模型一样。 -## 8\. 但也不要太随意 +## 8、但也不要太随意 -另一方面, [意大利面式代码][12] 容易失控,即使游戏开发没有大量代码。还好大多是游戏引擎用脑中的设计图建成。就拿 Godot 的[信号][13] 功能来说,节点可以发送数据信息给它们“连上了”的节点——这是你的设计自动成型的[观测图][14]。 只要你知道如何利用游戏引擎的特性,就可以快速写代码,你的代码也不会特别难读。 +另一方面, [意大利面式代码][12] 容易失控,即使游戏开发没有大量代码。还好大多是游戏引擎都考虑到了设计模式。就拿 Godot 的[信号][13] 功能来说,节点可以发送数据信息给它们“连上了”的节点 —— 这是你的设计自动成型的[观察者模式][14]。只要你知道如何利用这种游戏引擎的特性的优势,就可以快速写代码,你的代码也不会特别难读。 -## 9\. 取得反馈 +## 9、取得反馈 -向人们展示你正在做的。让他们试一试并看看他们说些啥。看看他们如何玩你的游戏,找找他们有没有发现你期望之外的事。如果游戏创作有[争论][15] 频道或者类似的,把你的游戏放上去,人们会反馈你的想法。 Paint Rider 的定义功能之一是画布循环,所以你可以看到之前留下来的画。在有人问我为什么这个游戏没有之前,我甚至没有考虑那个设置。 +向人们展示你正在做的。让他们试一试并看看他们说些啥。看看他们如何玩你的游戏,找找他们有没有发现你预料之外的事。如果游戏 Jam 活动有 [Discord][15] 频道或者类似的,把你的游戏放上去,人们会反馈给你想法。Paint Rider 的一个确定的功能是画布循环,所以你可以看到之前留下来的画。在有人问我为什么这个游戏没有之前,我甚至没有考虑那个机制。 -团队协作的话,确保有其他可以传递周围反馈的人参与这个开发。 +团队协作的话,确保有可以传递周围反馈的人参与这个开发。 而且不要忘了用相同的方式帮助其他人;如果你在玩其他人游戏的时候发现了有助于你游戏的东西,这就是双赢。 -## 10\. 哪里找资源 +## 10、哪里找资源 -做出所有你自己的组件真的会拖你后腿。 Open Jam 期间,当我忙于组装新特性和修漏洞时,我注意到 Loathsome 的开发者花了大量时间在绘制主要角色上,你可以简化游戏的艺术风格创作并且用一些视听效果尚可的东西,这里有其他选择。试着在 [Creative Commons][16] 上寻找组件或者免费音乐站点,比如 [Anttis Instrumentals][17] 。或者,可行的话,组一个有专门艺术家、作家或者音乐家的团队。 +做出所有你自己的资源真的会拖你后腿。Open Jam 期间,当我忙于组装新特性和修漏洞时,我注意到 Loathsome 的开发者花了大量时间在绘制主要角色上。你可以简化游戏的艺术风格创作并且用一些视听效果尚可的东西,但这里还有其他选择。试着寻找 [Creative Commons][16] 许可的或免费音乐站点(比如 [Anttis Instrumentals][17])的资源。或者,可行的话,组建一个有专门艺术家、作家或者音乐家的团队。 -其他你可能觉得有用的软件有 [Krita][18] ,一款适合数字绘画的开源 2D 图像生成软件,特别是如果你有一块绘图板,还有 [sfxr][19] ,一款游戏音效生成软件,很多参数可以调,但正如它的开发者所说:“基本用法包括了按下随机按钮。”( Paint Rider 的所有音效都是用 Sfxr 做的。)你也可以试试 [Calinou][20] 的众多但有序的开源游戏开发软件列表。 +其他你可能觉得有用的软件有 [Krita][18],这是一款适合数字绘画的开源 2D 图像生成软件,特别是如果你有一块绘图板的话;还有 [sfxr][19],这是一款游戏音效生成软件,很多参数可以调,但正如它的开发者所说:“它的基本用法包括了按下随机按钮。”(Paint Rider 的所有音效都是用 Sfxr 做的。)你也可以试试 [Calinou][20] 的众多但有序的开源游戏开发软件列表。 -你参加 Open Jam 或者其他游戏创作并有别的建议吗?对我未提及的有问题吗?有的话,请在评论中分享。 +你参加 Open Jam 或者其他游戏 Jam 并有别的建议吗?对我未提及的有问题吗?有的话,请在评论中分享。 -------------------------------------------------------------------------------- @@ -72,7 +73,7 @@ via: https://opensource.com/article/17/12/10-keys-rapid-open-source-game-develop 作者:[Ryan Estes][a] 译者:[XYenChi](https://github.com/XYenChi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7736dd12f577ebe92883f5447abe955189e0d4e4 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 23:27:58 +0800 Subject: [PATCH 114/164] PUB:20171222 10 keys to quick game development.md @XYenChi https://linux.cn/article-10496-1.html --- .../20171222 10 keys to quick game development.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/talk => published}/20171222 10 keys to quick game development.md (100%) diff --git a/translated/talk/20171222 10 keys to quick game development.md b/published/20171222 10 keys to quick game development.md similarity index 100% rename from translated/talk/20171222 10 keys to quick game development.md rename to published/20171222 10 keys to quick game development.md From 35d521d1c9c4f0b50ee4cf0a795054dc369bbdce Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 23:29:57 +0800 Subject: [PATCH 115/164] PRF:20171222 10 keys to quick game development.md --- ...71222 10 keys to quick game development.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/published/20171222 10 keys to quick game development.md b/published/20171222 10 keys to quick game development.md index 54dbd9fb99..34a63f44dc 100644 --- a/published/20171222 10 keys to quick game development.md +++ b/published/20171222 10 keys to quick game development.md @@ -9,49 +9,49 @@ 根据我在游戏开发和游戏开发方面的经验,这里有 10 条关于游戏引擎、编码和快速游戏开发的经验教训。 -## 1、限定规模 +### 1、限定规模 很容易想要去做一个规模宏大的冒险游戏或者可以比拟你最喜欢的游戏的东西。如果你有一些经验,追求超乎游戏 Jam 活动的东西可能很酷,但不要高估自己拥有的时间。我欣赏游戏 Jam 活动的一点是它强制你快速将一个游戏从概念阶段变成最终产品,因为你的时间非常有限。这也就是限定规模如此重要的原因。 这个 Open Jam 的主题是“留下痕迹”,题目一出来,我和朋友就开始讨论什么样的游戏适合该主题。一个想法就是做玩家能在敌人身上留下伤痕的 3D 拳击游戏。我几乎没有做 3D 游戏的经验,我想做好的话,在我甚至还没发掘出可玩性之前,就得花太多时间在学习如何让痕迹合理和打击有效。 -## 2、尽早可玩 +### 2、尽早可玩 这是我对游戏 Jam 活动最中肯的建议。试着做出核心机制,快速写出代码,这样你就可以测试并决定它是否值得做成一个完整的游戏。不应该只剩几个小时截止了,你的游戏才可玩。像 Open Jam 这样的三天的活动,不应该花费几个小时以上来做一个可以运行的演示。 -## 3、保持简单 +### 3、保持简单 你想加入的每个特性都会延长整个开发时间。因为你不能迅速使之运行,所以无从得知提交一个新特性是否会消耗大量时间。街机风格的高分作品往往会在游戏 Jam 活动中表现良好,它们天生就很简单。一旦核心部分完成,你可以开始加入特性并润色,无需担心最后游戏是否功能正常。 -## 4、从其他游戏获取灵感 +### 4、从其他游戏获取灵感 可能你想做出完全原创的作品,但有个可以基于它开发的原型极其有用。这将节省重复劳动的时间,因为你已经知道什么有趣。告诉自己实践的经验越多,越容易做出包含自己想法的大型游戏,所以你也能从再创作其他人的作品中得到很好地练习。 考虑到 Open Jam 的“留下痕迹”主题,我觉得创作一个玩的时候可以留下颜料痕迹的游戏会很有趣,这样也可以看到你留下的标记。我记得有款老式动画游戏 [Line Rider 2 Beta][10] (后来叫 Paint Rider),而且知道玩的时候按住 Control 键可以画出痕迹的彩蛋。我简化了这个概念,甚至只需要一个按键来垂直移动。(更像老式飞机游戏)。进入到 Jam 活动大概一两个小时后,我就有了基本模型,可以用一个按钮上下移动和留下小黑圈的痕迹。 -## 5、不要忽视可得性 +### 5、不要忽视可得性 确保尽可能多的人能玩你的游戏。某个提交到 Open Jam 的游戏是虚拟现实游戏。尽管那很酷,但几乎没有人可以玩,因为拥有 VR 设备的人不多。所幸它的开发者并不期望取得好名次,只是想练手。但如果你想和人们分享你的游戏(或者赢得游戏 Jam 活动),注意可得性是很重要的。 Godot (和其他大多数游戏引擎)允许你在所有主流平台发布游戏。提交游戏时,特别是在 [Itch.io][11],有个浏览器版本就可以支持大多数人玩。但尽你所能去发布在更多的平台和操作系统上。我甚至试着在移动端发布 Paint Rider,但技术有限。 -## 6、不要做得太难 +### 6、不要做得太难 如果游戏需要花费过多精力去学或者玩,你将失去一部分玩家。要保持简单和限定规模,这在游戏计划阶段非常重要。再次重申,想出一个需要花上十天半个月开发的宏大的游戏创意很容易;难的是做出好玩、简单的游戏。 给我的妈妈介绍了 Paint Rider 之后,她很快开始玩起来,我认为不需要跟她说明更多。 -## 7、不用太整洁 +### 7、不用太整洁 如果你习惯于花时间在设计模式上和确保代码可复用、可适应,试着放松一点。如果你花太多时间考虑设计,当你最后到了可以玩游戏的时候,你可能发现游戏不是很有趣,那时候就来不及修改了。 这过程也适用于简化更严格的游戏:快速码出验证概念性展示模型,直到找出值得做成完整游戏的,然后你可以潜心建立完美的代码来支持它。为游戏 Jame 活动创作的游戏就像是个快速开发一个可验证的模型一样。 -## 8、但也不要太随意 +### 8、但也不要太随意 另一方面, [意大利面式代码][12] 容易失控,即使游戏开发没有大量代码。还好大多是游戏引擎都考虑到了设计模式。就拿 Godot 的[信号][13] 功能来说,节点可以发送数据信息给它们“连上了”的节点 —— 这是你的设计自动成型的[观察者模式][14]。只要你知道如何利用这种游戏引擎的特性的优势,就可以快速写代码,你的代码也不会特别难读。 -## 9、取得反馈 +### 9、取得反馈 向人们展示你正在做的。让他们试一试并看看他们说些啥。看看他们如何玩你的游戏,找找他们有没有发现你预料之外的事。如果游戏 Jam 活动有 [Discord][15] 频道或者类似的,把你的游戏放上去,人们会反馈给你想法。Paint Rider 的一个确定的功能是画布循环,所以你可以看到之前留下来的画。在有人问我为什么这个游戏没有之前,我甚至没有考虑那个机制。 @@ -59,7 +59,7 @@ Godot (和其他大多数游戏引擎)允许你在所有主流平台发布 而且不要忘了用相同的方式帮助其他人;如果你在玩其他人游戏的时候发现了有助于你游戏的东西,这就是双赢。 -## 10、哪里找资源 +### 10、哪里找资源 做出所有你自己的资源真的会拖你后腿。Open Jam 期间,当我忙于组装新特性和修漏洞时,我注意到 Loathsome 的开发者花了大量时间在绘制主要角色上。你可以简化游戏的艺术风格创作并且用一些视听效果尚可的东西,但这里还有其他选择。试着寻找 [Creative Commons][16] 许可的或免费音乐站点(比如 [Anttis Instrumentals][17])的资源。或者,可行的话,组建一个有专门艺术家、作家或者音乐家的团队。 From f2960461cc678238c7c118419abb63c8685c3352 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 31 Jan 2019 23:43:07 +0800 Subject: [PATCH 116/164] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20201901?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4 Computer Laboratory - Raspberry Pi- Lesson 0 Introduction.md | 0 .../20120201 Computer Laboratory - Raspberry Pi- Lesson 1 OK01.md | 0 .../20120202 Computer Laboratory - Raspberry Pi- Lesson 2 OK02.md | 0 published/{ => 201901}/20150717 The History of Hello World.md | 0 .../20170523 Best Websites to Download Linux Games.md | 0 published/{ => 201901}/20170921 The Rise and Rise of JSON.md | 0 ...928 How to create a free baby monitoring system with Gonimo.md | 0 published/{ => 201901}/20171119 The Ruby Story.md | 0 ... started with Turtl, an open source alternative to Evernote.md | 0 .../{ => 201901}/20171222 10 keys to quick game development.md | 0 .../20171227 YAML- probably not so great after all.md | 0 .../20180108 5 arcade-style games in your Linux repository.md | 0 ...rful Terminal Multiplexer For Heavy Command-Line Linux User.md | 0 ...2 How to manage your workstation configuration with Ansible.md | 0 ...ith PGP - Part 4- Moving Your Master Key to Offline Storage.md | 0 ...rity with PGP - Part 5- Moving Subkeys to a Hardware Device.md | 0 ...ommon questions about agile development practices for teams.md | 0 ...ecting Code Integrity with PGP - Part 6- Using PGP with Git.md | 0 ...age your workstation with Ansible- Automating configuration.md | 0 ...ode Integrity with PGP - Part 7- Protecting Online Accounts.md | 0 .../20180411 How To Setup Static File Server Instantly.md | 0 ...principles you should know before you design a microservice.md | 0 published/{ => 201901}/20180428 A Beginners Guide To Flatpak.md | 0 .../20180503 11 Methods To Find System-Server Uptime In Linux.md | 0 .../20180507 Modularity in Fedora 28 Server Edition.md | 0 .../20180604 4 Firefox extensions worth checking out.md | 0 .../{ => 201901}/20180606 Working with modules in Fedora 28.md | 0 ...0180625 8 reasons to use the Xfce Linux desktop environment.md | 0 .../{ => 201901}/20180625 The life cycle of a software bug.md | 0 .../20180703 10 killer tools for the admin in a hurry.md | 0 .../20180722 Dawn of the Microcomputer- The Altair 8800.md | 0 .../20180725 Build an interactive CLI with Node.js.md | 0 published/{ => 201901}/20180731 How to be the lazy sysadmin.md | 0 .../20180809 Perform robust unit tests with PyHamcrest.md | 0 ...80814 5 open source strategy and simulation games for Linux.md | 0 .../{ => 201901}/20180919 5 ways DevSecOps changes security.md | 0 ...ount Dropbox Folder Locally As Virtual File System In Linux.md | 0 published/{ => 201901}/20181016 Final JOS project.md | 0 published/{ => 201901}/20181016 Lab 6- Network Driver.md | 0 ...20181029 How I organize my knowledge as a Software Engineer.md | 0 ...h-Audit - A Tool To Check Vulnerable Packages In Arch Linux.md | 0 ...20181128 Turn an old Linux desktop into a home media center.md | 0 .../20181203 How to bring good fortune to your Linux terminal.md | 0 ... To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04.md | 0 ...07 Plan your own holiday calendar at the Linux command line.md | 0 ...09 Powers of two, powers of Linux- 2048 at the command line.md | 0 ...210 How to Update Ubuntu -Terminal - GUI Methods- It-s FOSS.md | 0 ...Fly - A Replacement To ‘Ctrl-R- Bash History Search Feature.md | 0 .../20181210 Snake your way across your Linux terminal.md | 0 .../{ => 201901}/20181211 Winterize your Bash prompt in Linux.md | 0 .../20181212 5 resolutions for open source project maintainers.md | 0 ...What is PPA- Everything You Need to Know About PPA in Linux.md | 0 .../20181214 The Linux terminal is no one-trick pony.md | 0 ...o the arcade in your Linux terminal with this Pac-man clone.md | 0 ...181217 4 cool new projects to try in COPR for December 2018.md | 0 published/{ => 201901}/20181217 Working with tarballs on Linux.md | 0 ... - Record Your Terminal Sessions As SVG Animations In Linux.md | 0 ...20181218 Use your Linux terminal to celebrate a banner year.md | 0 .../20181219 How to open source your Python library.md | 0 ...181219 Solve a puzzle at the Linux command line with nudoku.md | 0 .../20181220 How To Install Microsoft .NET Core SDK On Linux.md | 0 .../20181220 Let your Linux terminal speak its mind.md | 0 ... Easy Way To Remove Programs Installed From Source In Linux.md | 0 .../20181221 How to Build a Netboot Server, Part 3.md | 0 published/{ => 201901}/20181222 A Tale of HTTP-2.md | 0 ...0181222 Top 11 best Image Viewer for Ubuntu and other Linux.md | 0 .../20181222 Watch YouTube videos at the Linux terminal.md | 0 .../20181223 The Linux command line can fetch fun from afar.md | 0 .../20190103 How to create presentations with Beamer.md | 0 ... CPU Temperature, Frequency, Power And Utilization In Linux.md | 0 published/{ => 201901}/20190104 Managing dotfiles with rcm.md | 0 ... started with Pelican- A Python-based static site generator.md | 0 .../{ => 201901}/20190109 Bash 5.0 Released with New Features.md | 0 .../20190109 Understanding -etc-services file in Linux.md | 0 .../20190113 Get started with Joplin, a note-taking app.md | 0 ...0190114 Get started with Wekan, an open source kanban board.md | 0 ...To Move Multiple File Types Simultaneously From Commandline.md | 0 .../20190114 How to Build a Netboot Server, Part 4.md | 0 .../20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md | 0 .../{ => 201901}/20190114 You (probably) don-t need Kubernetes.md | 0 .../{ => 201901}/20190115 Linux Tools- The Meaning of Dot.md | 0 ...20190118 Get started with WTF, a dashboard for the terminal.md | 0 .../{ => 201901}/20190118 Top 5 Linux Server Distributions.md | 0 ...Getting started with Isotope, an open source webmail client.md | 0 84 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 201901}/20120104 Computer Laboratory - Raspberry Pi- Lesson 0 Introduction.md (100%) rename published/{ => 201901}/20120201 Computer Laboratory - Raspberry Pi- Lesson 1 OK01.md (100%) rename published/{ => 201901}/20120202 Computer Laboratory - Raspberry Pi- Lesson 2 OK02.md (100%) rename published/{ => 201901}/20150717 The History of Hello World.md (100%) rename published/{ => 201901}/20170523 Best Websites to Download Linux Games.md (100%) rename published/{ => 201901}/20170921 The Rise and Rise of JSON.md (100%) rename published/{ => 201901}/20170928 How to create a free baby monitoring system with Gonimo.md (100%) rename published/{ => 201901}/20171119 The Ruby Story.md (100%) rename published/{ => 201901}/20171206 Getting started with Turtl, an open source alternative to Evernote.md (100%) rename published/{ => 201901}/20171222 10 keys to quick game development.md (100%) rename published/{ => 201901}/20171227 YAML- probably not so great after all.md (100%) rename published/{ => 201901}/20180108 5 arcade-style games in your Linux repository.md (100%) rename published/{ => 201901}/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md (100%) rename published/{ => 201901}/20180302 How to manage your workstation configuration with Ansible.md (100%) rename published/{ => 201901}/20180307 Protecting Code Integrity with PGP - Part 4- Moving Your Master Key to Offline Storage.md (100%) rename published/{ => 201901}/20180314 Protecting Code Integrity with PGP - Part 5- Moving Subkeys to a Hardware Device.md (100%) rename published/{ => 201901}/20180319 6 common questions about agile development practices for teams.md (100%) rename published/{ => 201901}/20180321 Protecting Code Integrity with PGP - Part 6- Using PGP with Git.md (100%) rename published/{ => 201901}/20180326 Manage your workstation with Ansible- Automating configuration.md (100%) rename published/{ => 201901}/20180327 Protecting Code Integrity with PGP - Part 7- Protecting Online Accounts.md (100%) rename published/{ => 201901}/20180411 How To Setup Static File Server Instantly.md (100%) rename published/{ => 201901}/20180419 5 guiding principles you should know before you design a microservice.md (100%) rename published/{ => 201901}/20180428 A Beginners Guide To Flatpak.md (100%) rename published/{ => 201901}/20180503 11 Methods To Find System-Server Uptime In Linux.md (100%) rename published/{ => 201901}/20180507 Modularity in Fedora 28 Server Edition.md (100%) rename published/{ => 201901}/20180604 4 Firefox extensions worth checking out.md (100%) rename published/{ => 201901}/20180606 Working with modules in Fedora 28.md (100%) rename published/{ => 201901}/20180625 8 reasons to use the Xfce Linux desktop environment.md (100%) rename published/{ => 201901}/20180625 The life cycle of a software bug.md (100%) rename published/{ => 201901}/20180703 10 killer tools for the admin in a hurry.md (100%) rename published/{ => 201901}/20180722 Dawn of the Microcomputer- The Altair 8800.md (100%) rename published/{ => 201901}/20180725 Build an interactive CLI with Node.js.md (100%) rename published/{ => 201901}/20180731 How to be the lazy sysadmin.md (100%) rename published/{ => 201901}/20180809 Perform robust unit tests with PyHamcrest.md (100%) rename published/{ => 201901}/20180814 5 open source strategy and simulation games for Linux.md (100%) rename published/{ => 201901}/20180919 5 ways DevSecOps changes security.md (100%) rename published/{ => 201901}/20181005 Dbxfs - Mount Dropbox Folder Locally As Virtual File System In Linux.md (100%) rename published/{ => 201901}/20181016 Final JOS project.md (100%) rename published/{ => 201901}/20181016 Lab 6- Network Driver.md (100%) rename published/{ => 201901}/20181029 How I organize my knowledge as a Software Engineer.md (100%) rename published/{ => 201901}/20181128 Arch-Audit - A Tool To Check Vulnerable Packages In Arch Linux.md (100%) rename published/{ => 201901}/20181128 Turn an old Linux desktop into a home media center.md (100%) rename published/{ => 201901}/20181203 How to bring good fortune to your Linux terminal.md (100%) rename published/{ => 201901}/20181206 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04.md (100%) rename published/{ => 201901}/20181207 Plan your own holiday calendar at the Linux command line.md (100%) rename published/{ => 201901}/20181209 Powers of two, powers of Linux- 2048 at the command line.md (100%) rename published/{ => 201901}/20181210 How to Update Ubuntu -Terminal - GUI Methods- It-s FOSS.md (100%) rename published/{ => 201901}/20181210 McFly - A Replacement To ‘Ctrl-R- Bash History Search Feature.md (100%) rename published/{ => 201901}/20181210 Snake your way across your Linux terminal.md (100%) rename published/{ => 201901}/20181211 Winterize your Bash prompt in Linux.md (100%) rename published/{ => 201901}/20181212 5 resolutions for open source project maintainers.md (100%) rename published/{ => 201901}/20181213 What is PPA- Everything You Need to Know About PPA in Linux.md (100%) rename published/{ => 201901}/20181214 The Linux terminal is no one-trick pony.md (100%) rename published/{ => 201901}/20181215 Head to the arcade in your Linux terminal with this Pac-man clone.md (100%) rename published/{ => 201901}/20181217 4 cool new projects to try in COPR for December 2018.md (100%) rename published/{ => 201901}/20181217 Working with tarballs on Linux.md (100%) rename published/{ => 201901}/20181218 Termtosvg - Record Your Terminal Sessions As SVG Animations In Linux.md (100%) rename published/{ => 201901}/20181218 Use your Linux terminal to celebrate a banner year.md (100%) rename published/{ => 201901}/20181219 How to open source your Python library.md (100%) rename published/{ => 201901}/20181219 Solve a puzzle at the Linux command line with nudoku.md (100%) rename published/{ => 201901}/20181220 How To Install Microsoft .NET Core SDK On Linux.md (100%) rename published/{ => 201901}/20181220 Let your Linux terminal speak its mind.md (100%) rename published/{ => 201901}/20181221 An Easy Way To Remove Programs Installed From Source In Linux.md (100%) rename published/{ => 201901}/20181221 How to Build a Netboot Server, Part 3.md (100%) rename published/{ => 201901}/20181222 A Tale of HTTP-2.md (100%) rename published/{ => 201901}/20181222 Top 11 best Image Viewer for Ubuntu and other Linux.md (100%) rename published/{ => 201901}/20181222 Watch YouTube videos at the Linux terminal.md (100%) rename published/{ => 201901}/20181223 The Linux command line can fetch fun from afar.md (100%) rename published/{ => 201901}/20190103 How to create presentations with Beamer.md (100%) rename published/{ => 201901}/20190103 s-tui- A Terminal Tool To Monitor CPU Temperature, Frequency, Power And Utilization In Linux.md (100%) rename published/{ => 201901}/20190104 Managing dotfiles with rcm.md (100%) rename published/{ => 201901}/20190107 Getting started with Pelican- A Python-based static site generator.md (100%) rename published/{ => 201901}/20190109 Bash 5.0 Released with New Features.md (100%) rename published/{ => 201901}/20190109 Understanding -etc-services file in Linux.md (100%) rename published/{ => 201901}/20190113 Get started with Joplin, a note-taking app.md (100%) rename published/{ => 201901}/20190114 Get started with Wekan, an open source kanban board.md (100%) rename published/{ => 201901}/20190114 How To Move Multiple File Types Simultaneously From Commandline.md (100%) rename published/{ => 201901}/20190114 How to Build a Netboot Server, Part 4.md (100%) rename published/{ => 201901}/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md (100%) rename published/{ => 201901}/20190114 You (probably) don-t need Kubernetes.md (100%) rename published/{ => 201901}/20190115 Linux Tools- The Meaning of Dot.md (100%) rename published/{ => 201901}/20190118 Get started with WTF, a dashboard for the terminal.md (100%) rename published/{ => 201901}/20190118 Top 5 Linux Server Distributions.md (100%) rename published/{ => 201901}/20190123 Getting started with Isotope, an open source webmail client.md (100%) diff --git a/published/20120104 Computer Laboratory - Raspberry Pi- Lesson 0 Introduction.md b/published/201901/20120104 Computer Laboratory - Raspberry Pi- Lesson 0 Introduction.md similarity index 100% rename from published/20120104 Computer Laboratory - Raspberry Pi- Lesson 0 Introduction.md rename to published/201901/20120104 Computer Laboratory - Raspberry Pi- Lesson 0 Introduction.md diff --git a/published/20120201 Computer Laboratory - Raspberry Pi- Lesson 1 OK01.md b/published/201901/20120201 Computer Laboratory - Raspberry Pi- Lesson 1 OK01.md similarity index 100% rename from published/20120201 Computer Laboratory - Raspberry Pi- Lesson 1 OK01.md rename to published/201901/20120201 Computer Laboratory - Raspberry Pi- Lesson 1 OK01.md diff --git a/published/20120202 Computer Laboratory - Raspberry Pi- Lesson 2 OK02.md b/published/201901/20120202 Computer Laboratory - Raspberry Pi- Lesson 2 OK02.md similarity index 100% rename from published/20120202 Computer Laboratory - Raspberry Pi- Lesson 2 OK02.md rename to published/201901/20120202 Computer Laboratory - Raspberry Pi- Lesson 2 OK02.md diff --git a/published/20150717 The History of Hello World.md b/published/201901/20150717 The History of Hello World.md similarity index 100% rename from published/20150717 The History of Hello World.md rename to published/201901/20150717 The History of Hello World.md diff --git a/published/20170523 Best Websites to Download Linux Games.md b/published/201901/20170523 Best Websites to Download Linux Games.md similarity index 100% rename from published/20170523 Best Websites to Download Linux Games.md rename to published/201901/20170523 Best Websites to Download Linux Games.md diff --git a/published/20170921 The Rise and Rise of JSON.md b/published/201901/20170921 The Rise and Rise of JSON.md similarity index 100% rename from published/20170921 The Rise and Rise of JSON.md rename to published/201901/20170921 The Rise and Rise of JSON.md diff --git a/published/20170928 How to create a free baby monitoring system with Gonimo.md b/published/201901/20170928 How to create a free baby monitoring system with Gonimo.md similarity index 100% rename from published/20170928 How to create a free baby monitoring system with Gonimo.md rename to published/201901/20170928 How to create a free baby monitoring system with Gonimo.md diff --git a/published/20171119 The Ruby Story.md b/published/201901/20171119 The Ruby Story.md similarity index 100% rename from published/20171119 The Ruby Story.md rename to published/201901/20171119 The Ruby Story.md diff --git a/published/20171206 Getting started with Turtl, an open source alternative to Evernote.md b/published/201901/20171206 Getting started with Turtl, an open source alternative to Evernote.md similarity index 100% rename from published/20171206 Getting started with Turtl, an open source alternative to Evernote.md rename to published/201901/20171206 Getting started with Turtl, an open source alternative to Evernote.md diff --git a/published/20171222 10 keys to quick game development.md b/published/201901/20171222 10 keys to quick game development.md similarity index 100% rename from published/20171222 10 keys to quick game development.md rename to published/201901/20171222 10 keys to quick game development.md diff --git a/published/20171227 YAML- probably not so great after all.md b/published/201901/20171227 YAML- probably not so great after all.md similarity index 100% rename from published/20171227 YAML- probably not so great after all.md rename to published/201901/20171227 YAML- probably not so great after all.md diff --git a/published/20180108 5 arcade-style games in your Linux repository.md b/published/201901/20180108 5 arcade-style games in your Linux repository.md similarity index 100% rename from published/20180108 5 arcade-style games in your Linux repository.md rename to published/201901/20180108 5 arcade-style games in your Linux repository.md diff --git a/published/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md b/published/201901/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md similarity index 100% rename from published/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md rename to published/201901/20180130 tmux - A Powerful Terminal Multiplexer For Heavy Command-Line Linux User.md diff --git a/published/20180302 How to manage your workstation configuration with Ansible.md b/published/201901/20180302 How to manage your workstation configuration with Ansible.md similarity index 100% rename from published/20180302 How to manage your workstation configuration with Ansible.md rename to published/201901/20180302 How to manage your workstation configuration with Ansible.md diff --git a/published/20180307 Protecting Code Integrity with PGP - Part 4- Moving Your Master Key to Offline Storage.md b/published/201901/20180307 Protecting Code Integrity with PGP - Part 4- Moving Your Master Key to Offline Storage.md similarity index 100% rename from published/20180307 Protecting Code Integrity with PGP - Part 4- Moving Your Master Key to Offline Storage.md rename to published/201901/20180307 Protecting Code Integrity with PGP - Part 4- Moving Your Master Key to Offline Storage.md diff --git a/published/20180314 Protecting Code Integrity with PGP - Part 5- Moving Subkeys to a Hardware Device.md b/published/201901/20180314 Protecting Code Integrity with PGP - Part 5- Moving Subkeys to a Hardware Device.md similarity index 100% rename from published/20180314 Protecting Code Integrity with PGP - Part 5- Moving Subkeys to a Hardware Device.md rename to published/201901/20180314 Protecting Code Integrity with PGP - Part 5- Moving Subkeys to a Hardware Device.md diff --git a/published/20180319 6 common questions about agile development practices for teams.md b/published/201901/20180319 6 common questions about agile development practices for teams.md similarity index 100% rename from published/20180319 6 common questions about agile development practices for teams.md rename to published/201901/20180319 6 common questions about agile development practices for teams.md diff --git a/published/20180321 Protecting Code Integrity with PGP - Part 6- Using PGP with Git.md b/published/201901/20180321 Protecting Code Integrity with PGP - Part 6- Using PGP with Git.md similarity index 100% rename from published/20180321 Protecting Code Integrity with PGP - Part 6- Using PGP with Git.md rename to published/201901/20180321 Protecting Code Integrity with PGP - Part 6- Using PGP with Git.md diff --git a/published/20180326 Manage your workstation with Ansible- Automating configuration.md b/published/201901/20180326 Manage your workstation with Ansible- Automating configuration.md similarity index 100% rename from published/20180326 Manage your workstation with Ansible- Automating configuration.md rename to published/201901/20180326 Manage your workstation with Ansible- Automating configuration.md diff --git a/published/20180327 Protecting Code Integrity with PGP - Part 7- Protecting Online Accounts.md b/published/201901/20180327 Protecting Code Integrity with PGP - Part 7- Protecting Online Accounts.md similarity index 100% rename from published/20180327 Protecting Code Integrity with PGP - Part 7- Protecting Online Accounts.md rename to published/201901/20180327 Protecting Code Integrity with PGP - Part 7- Protecting Online Accounts.md diff --git a/published/20180411 How To Setup Static File Server Instantly.md b/published/201901/20180411 How To Setup Static File Server Instantly.md similarity index 100% rename from published/20180411 How To Setup Static File Server Instantly.md rename to published/201901/20180411 How To Setup Static File Server Instantly.md diff --git a/published/20180419 5 guiding principles you should know before you design a microservice.md b/published/201901/20180419 5 guiding principles you should know before you design a microservice.md similarity index 100% rename from published/20180419 5 guiding principles you should know before you design a microservice.md rename to published/201901/20180419 5 guiding principles you should know before you design a microservice.md diff --git a/published/20180428 A Beginners Guide To Flatpak.md b/published/201901/20180428 A Beginners Guide To Flatpak.md similarity index 100% rename from published/20180428 A Beginners Guide To Flatpak.md rename to published/201901/20180428 A Beginners Guide To Flatpak.md diff --git a/published/20180503 11 Methods To Find System-Server Uptime In Linux.md b/published/201901/20180503 11 Methods To Find System-Server Uptime In Linux.md similarity index 100% rename from published/20180503 11 Methods To Find System-Server Uptime In Linux.md rename to published/201901/20180503 11 Methods To Find System-Server Uptime In Linux.md diff --git a/published/20180507 Modularity in Fedora 28 Server Edition.md b/published/201901/20180507 Modularity in Fedora 28 Server Edition.md similarity index 100% rename from published/20180507 Modularity in Fedora 28 Server Edition.md rename to published/201901/20180507 Modularity in Fedora 28 Server Edition.md diff --git a/published/20180604 4 Firefox extensions worth checking out.md b/published/201901/20180604 4 Firefox extensions worth checking out.md similarity index 100% rename from published/20180604 4 Firefox extensions worth checking out.md rename to published/201901/20180604 4 Firefox extensions worth checking out.md diff --git a/published/20180606 Working with modules in Fedora 28.md b/published/201901/20180606 Working with modules in Fedora 28.md similarity index 100% rename from published/20180606 Working with modules in Fedora 28.md rename to published/201901/20180606 Working with modules in Fedora 28.md diff --git a/published/20180625 8 reasons to use the Xfce Linux desktop environment.md b/published/201901/20180625 8 reasons to use the Xfce Linux desktop environment.md similarity index 100% rename from published/20180625 8 reasons to use the Xfce Linux desktop environment.md rename to published/201901/20180625 8 reasons to use the Xfce Linux desktop environment.md diff --git a/published/20180625 The life cycle of a software bug.md b/published/201901/20180625 The life cycle of a software bug.md similarity index 100% rename from published/20180625 The life cycle of a software bug.md rename to published/201901/20180625 The life cycle of a software bug.md diff --git a/published/20180703 10 killer tools for the admin in a hurry.md b/published/201901/20180703 10 killer tools for the admin in a hurry.md similarity index 100% rename from published/20180703 10 killer tools for the admin in a hurry.md rename to published/201901/20180703 10 killer tools for the admin in a hurry.md diff --git a/published/20180722 Dawn of the Microcomputer- The Altair 8800.md b/published/201901/20180722 Dawn of the Microcomputer- The Altair 8800.md similarity index 100% rename from published/20180722 Dawn of the Microcomputer- The Altair 8800.md rename to published/201901/20180722 Dawn of the Microcomputer- The Altair 8800.md diff --git a/published/20180725 Build an interactive CLI with Node.js.md b/published/201901/20180725 Build an interactive CLI with Node.js.md similarity index 100% rename from published/20180725 Build an interactive CLI with Node.js.md rename to published/201901/20180725 Build an interactive CLI with Node.js.md diff --git a/published/20180731 How to be the lazy sysadmin.md b/published/201901/20180731 How to be the lazy sysadmin.md similarity index 100% rename from published/20180731 How to be the lazy sysadmin.md rename to published/201901/20180731 How to be the lazy sysadmin.md diff --git a/published/20180809 Perform robust unit tests with PyHamcrest.md b/published/201901/20180809 Perform robust unit tests with PyHamcrest.md similarity index 100% rename from published/20180809 Perform robust unit tests with PyHamcrest.md rename to published/201901/20180809 Perform robust unit tests with PyHamcrest.md diff --git a/published/20180814 5 open source strategy and simulation games for Linux.md b/published/201901/20180814 5 open source strategy and simulation games for Linux.md similarity index 100% rename from published/20180814 5 open source strategy and simulation games for Linux.md rename to published/201901/20180814 5 open source strategy and simulation games for Linux.md diff --git a/published/20180919 5 ways DevSecOps changes security.md b/published/201901/20180919 5 ways DevSecOps changes security.md similarity index 100% rename from published/20180919 5 ways DevSecOps changes security.md rename to published/201901/20180919 5 ways DevSecOps changes security.md diff --git a/published/20181005 Dbxfs - Mount Dropbox Folder Locally As Virtual File System In Linux.md b/published/201901/20181005 Dbxfs - Mount Dropbox Folder Locally As Virtual File System In Linux.md similarity index 100% rename from published/20181005 Dbxfs - Mount Dropbox Folder Locally As Virtual File System In Linux.md rename to published/201901/20181005 Dbxfs - Mount Dropbox Folder Locally As Virtual File System In Linux.md diff --git a/published/20181016 Final JOS project.md b/published/201901/20181016 Final JOS project.md similarity index 100% rename from published/20181016 Final JOS project.md rename to published/201901/20181016 Final JOS project.md diff --git a/published/20181016 Lab 6- Network Driver.md b/published/201901/20181016 Lab 6- Network Driver.md similarity index 100% rename from published/20181016 Lab 6- Network Driver.md rename to published/201901/20181016 Lab 6- Network Driver.md diff --git a/published/20181029 How I organize my knowledge as a Software Engineer.md b/published/201901/20181029 How I organize my knowledge as a Software Engineer.md similarity index 100% rename from published/20181029 How I organize my knowledge as a Software Engineer.md rename to published/201901/20181029 How I organize my knowledge as a Software Engineer.md diff --git a/published/20181128 Arch-Audit - A Tool To Check Vulnerable Packages In Arch Linux.md b/published/201901/20181128 Arch-Audit - A Tool To Check Vulnerable Packages In Arch Linux.md similarity index 100% rename from published/20181128 Arch-Audit - A Tool To Check Vulnerable Packages In Arch Linux.md rename to published/201901/20181128 Arch-Audit - A Tool To Check Vulnerable Packages In Arch Linux.md diff --git a/published/20181128 Turn an old Linux desktop into a home media center.md b/published/201901/20181128 Turn an old Linux desktop into a home media center.md similarity index 100% rename from published/20181128 Turn an old Linux desktop into a home media center.md rename to published/201901/20181128 Turn an old Linux desktop into a home media center.md diff --git a/published/20181203 How to bring good fortune to your Linux terminal.md b/published/201901/20181203 How to bring good fortune to your Linux terminal.md similarity index 100% rename from published/20181203 How to bring good fortune to your Linux terminal.md rename to published/201901/20181203 How to bring good fortune to your Linux terminal.md diff --git a/published/20181206 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04.md b/published/201901/20181206 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04.md similarity index 100% rename from published/20181206 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04.md rename to published/201901/20181206 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04.md diff --git a/published/20181207 Plan your own holiday calendar at the Linux command line.md b/published/201901/20181207 Plan your own holiday calendar at the Linux command line.md similarity index 100% rename from published/20181207 Plan your own holiday calendar at the Linux command line.md rename to published/201901/20181207 Plan your own holiday calendar at the Linux command line.md diff --git a/published/20181209 Powers of two, powers of Linux- 2048 at the command line.md b/published/201901/20181209 Powers of two, powers of Linux- 2048 at the command line.md similarity index 100% rename from published/20181209 Powers of two, powers of Linux- 2048 at the command line.md rename to published/201901/20181209 Powers of two, powers of Linux- 2048 at the command line.md diff --git a/published/20181210 How to Update Ubuntu -Terminal - GUI Methods- It-s FOSS.md b/published/201901/20181210 How to Update Ubuntu -Terminal - GUI Methods- It-s FOSS.md similarity index 100% rename from published/20181210 How to Update Ubuntu -Terminal - GUI Methods- It-s FOSS.md rename to published/201901/20181210 How to Update Ubuntu -Terminal - GUI Methods- It-s FOSS.md diff --git a/published/20181210 McFly - A Replacement To ‘Ctrl-R- Bash History Search Feature.md b/published/201901/20181210 McFly - A Replacement To ‘Ctrl-R- Bash History Search Feature.md similarity index 100% rename from published/20181210 McFly - A Replacement To ‘Ctrl-R- Bash History Search Feature.md rename to published/201901/20181210 McFly - A Replacement To ‘Ctrl-R- Bash History Search Feature.md diff --git a/published/20181210 Snake your way across your Linux terminal.md b/published/201901/20181210 Snake your way across your Linux terminal.md similarity index 100% rename from published/20181210 Snake your way across your Linux terminal.md rename to published/201901/20181210 Snake your way across your Linux terminal.md diff --git a/published/20181211 Winterize your Bash prompt in Linux.md b/published/201901/20181211 Winterize your Bash prompt in Linux.md similarity index 100% rename from published/20181211 Winterize your Bash prompt in Linux.md rename to published/201901/20181211 Winterize your Bash prompt in Linux.md diff --git a/published/20181212 5 resolutions for open source project maintainers.md b/published/201901/20181212 5 resolutions for open source project maintainers.md similarity index 100% rename from published/20181212 5 resolutions for open source project maintainers.md rename to published/201901/20181212 5 resolutions for open source project maintainers.md diff --git a/published/20181213 What is PPA- Everything You Need to Know About PPA in Linux.md b/published/201901/20181213 What is PPA- Everything You Need to Know About PPA in Linux.md similarity index 100% rename from published/20181213 What is PPA- Everything You Need to Know About PPA in Linux.md rename to published/201901/20181213 What is PPA- Everything You Need to Know About PPA in Linux.md diff --git a/published/20181214 The Linux terminal is no one-trick pony.md b/published/201901/20181214 The Linux terminal is no one-trick pony.md similarity index 100% rename from published/20181214 The Linux terminal is no one-trick pony.md rename to published/201901/20181214 The Linux terminal is no one-trick pony.md diff --git a/published/20181215 Head to the arcade in your Linux terminal with this Pac-man clone.md b/published/201901/20181215 Head to the arcade in your Linux terminal with this Pac-man clone.md similarity index 100% rename from published/20181215 Head to the arcade in your Linux terminal with this Pac-man clone.md rename to published/201901/20181215 Head to the arcade in your Linux terminal with this Pac-man clone.md diff --git a/published/20181217 4 cool new projects to try in COPR for December 2018.md b/published/201901/20181217 4 cool new projects to try in COPR for December 2018.md similarity index 100% rename from published/20181217 4 cool new projects to try in COPR for December 2018.md rename to published/201901/20181217 4 cool new projects to try in COPR for December 2018.md diff --git a/published/20181217 Working with tarballs on Linux.md b/published/201901/20181217 Working with tarballs on Linux.md similarity index 100% rename from published/20181217 Working with tarballs on Linux.md rename to published/201901/20181217 Working with tarballs on Linux.md diff --git a/published/20181218 Termtosvg - Record Your Terminal Sessions As SVG Animations In Linux.md b/published/201901/20181218 Termtosvg - Record Your Terminal Sessions As SVG Animations In Linux.md similarity index 100% rename from published/20181218 Termtosvg - Record Your Terminal Sessions As SVG Animations In Linux.md rename to published/201901/20181218 Termtosvg - Record Your Terminal Sessions As SVG Animations In Linux.md diff --git a/published/20181218 Use your Linux terminal to celebrate a banner year.md b/published/201901/20181218 Use your Linux terminal to celebrate a banner year.md similarity index 100% rename from published/20181218 Use your Linux terminal to celebrate a banner year.md rename to published/201901/20181218 Use your Linux terminal to celebrate a banner year.md diff --git a/published/20181219 How to open source your Python library.md b/published/201901/20181219 How to open source your Python library.md similarity index 100% rename from published/20181219 How to open source your Python library.md rename to published/201901/20181219 How to open source your Python library.md diff --git a/published/20181219 Solve a puzzle at the Linux command line with nudoku.md b/published/201901/20181219 Solve a puzzle at the Linux command line with nudoku.md similarity index 100% rename from published/20181219 Solve a puzzle at the Linux command line with nudoku.md rename to published/201901/20181219 Solve a puzzle at the Linux command line with nudoku.md diff --git a/published/20181220 How To Install Microsoft .NET Core SDK On Linux.md b/published/201901/20181220 How To Install Microsoft .NET Core SDK On Linux.md similarity index 100% rename from published/20181220 How To Install Microsoft .NET Core SDK On Linux.md rename to published/201901/20181220 How To Install Microsoft .NET Core SDK On Linux.md diff --git a/published/20181220 Let your Linux terminal speak its mind.md b/published/201901/20181220 Let your Linux terminal speak its mind.md similarity index 100% rename from published/20181220 Let your Linux terminal speak its mind.md rename to published/201901/20181220 Let your Linux terminal speak its mind.md diff --git a/published/20181221 An Easy Way To Remove Programs Installed From Source In Linux.md b/published/201901/20181221 An Easy Way To Remove Programs Installed From Source In Linux.md similarity index 100% rename from published/20181221 An Easy Way To Remove Programs Installed From Source In Linux.md rename to published/201901/20181221 An Easy Way To Remove Programs Installed From Source In Linux.md diff --git a/published/20181221 How to Build a Netboot Server, Part 3.md b/published/201901/20181221 How to Build a Netboot Server, Part 3.md similarity index 100% rename from published/20181221 How to Build a Netboot Server, Part 3.md rename to published/201901/20181221 How to Build a Netboot Server, Part 3.md diff --git a/published/20181222 A Tale of HTTP-2.md b/published/201901/20181222 A Tale of HTTP-2.md similarity index 100% rename from published/20181222 A Tale of HTTP-2.md rename to published/201901/20181222 A Tale of HTTP-2.md diff --git a/published/20181222 Top 11 best Image Viewer for Ubuntu and other Linux.md b/published/201901/20181222 Top 11 best Image Viewer for Ubuntu and other Linux.md similarity index 100% rename from published/20181222 Top 11 best Image Viewer for Ubuntu and other Linux.md rename to published/201901/20181222 Top 11 best Image Viewer for Ubuntu and other Linux.md diff --git a/published/20181222 Watch YouTube videos at the Linux terminal.md b/published/201901/20181222 Watch YouTube videos at the Linux terminal.md similarity index 100% rename from published/20181222 Watch YouTube videos at the Linux terminal.md rename to published/201901/20181222 Watch YouTube videos at the Linux terminal.md diff --git a/published/20181223 The Linux command line can fetch fun from afar.md b/published/201901/20181223 The Linux command line can fetch fun from afar.md similarity index 100% rename from published/20181223 The Linux command line can fetch fun from afar.md rename to published/201901/20181223 The Linux command line can fetch fun from afar.md diff --git a/published/20190103 How to create presentations with Beamer.md b/published/201901/20190103 How to create presentations with Beamer.md similarity index 100% rename from published/20190103 How to create presentations with Beamer.md rename to published/201901/20190103 How to create presentations with Beamer.md diff --git a/published/20190103 s-tui- A Terminal Tool To Monitor CPU Temperature, Frequency, Power And Utilization In Linux.md b/published/201901/20190103 s-tui- A Terminal Tool To Monitor CPU Temperature, Frequency, Power And Utilization In Linux.md similarity index 100% rename from published/20190103 s-tui- A Terminal Tool To Monitor CPU Temperature, Frequency, Power And Utilization In Linux.md rename to published/201901/20190103 s-tui- A Terminal Tool To Monitor CPU Temperature, Frequency, Power And Utilization In Linux.md diff --git a/published/20190104 Managing dotfiles with rcm.md b/published/201901/20190104 Managing dotfiles with rcm.md similarity index 100% rename from published/20190104 Managing dotfiles with rcm.md rename to published/201901/20190104 Managing dotfiles with rcm.md diff --git a/published/20190107 Getting started with Pelican- A Python-based static site generator.md b/published/201901/20190107 Getting started with Pelican- A Python-based static site generator.md similarity index 100% rename from published/20190107 Getting started with Pelican- A Python-based static site generator.md rename to published/201901/20190107 Getting started with Pelican- A Python-based static site generator.md diff --git a/published/20190109 Bash 5.0 Released with New Features.md b/published/201901/20190109 Bash 5.0 Released with New Features.md similarity index 100% rename from published/20190109 Bash 5.0 Released with New Features.md rename to published/201901/20190109 Bash 5.0 Released with New Features.md diff --git a/published/20190109 Understanding -etc-services file in Linux.md b/published/201901/20190109 Understanding -etc-services file in Linux.md similarity index 100% rename from published/20190109 Understanding -etc-services file in Linux.md rename to published/201901/20190109 Understanding -etc-services file in Linux.md diff --git a/published/20190113 Get started with Joplin, a note-taking app.md b/published/201901/20190113 Get started with Joplin, a note-taking app.md similarity index 100% rename from published/20190113 Get started with Joplin, a note-taking app.md rename to published/201901/20190113 Get started with Joplin, a note-taking app.md diff --git a/published/20190114 Get started with Wekan, an open source kanban board.md b/published/201901/20190114 Get started with Wekan, an open source kanban board.md similarity index 100% rename from published/20190114 Get started with Wekan, an open source kanban board.md rename to published/201901/20190114 Get started with Wekan, an open source kanban board.md diff --git a/published/20190114 How To Move Multiple File Types Simultaneously From Commandline.md b/published/201901/20190114 How To Move Multiple File Types Simultaneously From Commandline.md similarity index 100% rename from published/20190114 How To Move Multiple File Types Simultaneously From Commandline.md rename to published/201901/20190114 How To Move Multiple File Types Simultaneously From Commandline.md diff --git a/published/20190114 How to Build a Netboot Server, Part 4.md b/published/201901/20190114 How to Build a Netboot Server, Part 4.md similarity index 100% rename from published/20190114 How to Build a Netboot Server, Part 4.md rename to published/201901/20190114 How to Build a Netboot Server, Part 4.md diff --git a/published/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md b/published/201901/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md similarity index 100% rename from published/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md rename to published/201901/20190114 Turn a Raspberry Pi 3B- into a PriTunl VPN.md diff --git a/published/20190114 You (probably) don-t need Kubernetes.md b/published/201901/20190114 You (probably) don-t need Kubernetes.md similarity index 100% rename from published/20190114 You (probably) don-t need Kubernetes.md rename to published/201901/20190114 You (probably) don-t need Kubernetes.md diff --git a/published/20190115 Linux Tools- The Meaning of Dot.md b/published/201901/20190115 Linux Tools- The Meaning of Dot.md similarity index 100% rename from published/20190115 Linux Tools- The Meaning of Dot.md rename to published/201901/20190115 Linux Tools- The Meaning of Dot.md diff --git a/published/20190118 Get started with WTF, a dashboard for the terminal.md b/published/201901/20190118 Get started with WTF, a dashboard for the terminal.md similarity index 100% rename from published/20190118 Get started with WTF, a dashboard for the terminal.md rename to published/201901/20190118 Get started with WTF, a dashboard for the terminal.md diff --git a/published/20190118 Top 5 Linux Server Distributions.md b/published/201901/20190118 Top 5 Linux Server Distributions.md similarity index 100% rename from published/20190118 Top 5 Linux Server Distributions.md rename to published/201901/20190118 Top 5 Linux Server Distributions.md diff --git a/published/20190123 Getting started with Isotope, an open source webmail client.md b/published/201901/20190123 Getting started with Isotope, an open source webmail client.md similarity index 100% rename from published/20190123 Getting started with Isotope, an open source webmail client.md rename to published/201901/20190123 Getting started with Isotope, an open source webmail client.md From 7b7b1bff4a311bee8812de88e12720d59ebe1429 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Thu, 31 Jan 2019 17:00:20 +0000 Subject: [PATCH 117/164] Revert "Update 20181222 How to detect automatically generated emails.md" This reverts commit c8477f3413db743d7868bbd7e42826dce22b7075. --- .../20181222 How to detect automatically generated emails.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20181222 How to detect automatically generated emails.md b/sources/tech/20181222 How to detect automatically generated emails.md index 2ccaeddeee..23b509a77b 100644 --- a/sources/tech/20181222 How to detect automatically generated emails.md +++ b/sources/tech/20181222 How to detect automatically generated emails.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (wyxplus) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 3ab907dd27e3690f6ba81415a27acd92aa29ad46 Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Fri, 1 Feb 2019 06:07:43 +0800 Subject: [PATCH 118/164] hankchow translating --- sources/tech/20190129 More About Angle Brackets in Bash.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190129 More About Angle Brackets in Bash.md b/sources/tech/20190129 More About Angle Brackets in Bash.md index 6a733a1ccc..5632fe6321 100644 --- a/sources/tech/20190129 More About Angle Brackets in Bash.md +++ b/sources/tech/20190129 More About Angle Brackets in Bash.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (HankChow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 5bef5c1a9e561db4cf16e774f7a685baa33ec213 Mon Sep 17 00:00:00 2001 From: Rachel Date: Thu, 31 Jan 2019 19:25:35 -0500 Subject: [PATCH 119/164] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20180611 3 open source alternatives to Adobe Lightroom.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/tech/20180611 3 open source alternatives to Adobe Lightroom.md b/sources/tech/20180611 3 open source alternatives to Adobe Lightroom.md index 664c054913..c489b0f0f1 100644 --- a/sources/tech/20180611 3 open source alternatives to Adobe Lightroom.md +++ b/sources/tech/20180611 3 open source alternatives to Adobe Lightroom.md @@ -1,3 +1,5 @@ +scoutydren is translating + 3 open source alternatives to Adobe Lightroom ====== From 1d9eb78b8efae14db10ca4bacfcad82b81117253 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 Feb 2019 10:32:17 +0800 Subject: [PATCH 120/164] translated --- ...Tint2, an open source taskbar for Linux.md | 59 ------------------- ...Tint2, an open source taskbar for Linux.md | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 59 deletions(-) delete mode 100644 sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md create mode 100644 translated/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md diff --git a/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md b/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md deleted file mode 100644 index e8afdbb417..0000000000 --- a/sources/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get started with Tint2, an open source taskbar for Linux) -[#]: via: (https://opensource.com/article/19/1/productivity-tool-tint2) -[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) - -Get started with Tint2, an open source taskbar for Linux -====== - -Tint2, the 14th in our series on open source tools that will make you more productive in 2019, offers a consistent user experience with any window manager. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl) - -There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. - -Here's the 14th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. - -### Tint2 - -One of the best ways for me to be more productive is to use a clean interface with as little distraction as possible. As a Linux user, this means using a minimal window manager like [Openbox][1], [i3][2], or [Awesome][3]. Each has customization options that make me more efficient. The one thing that slows me down is that none has a consistent configuration, so I have to tweak and re-tune my window manager constantly. - -![](https://opensource.com/sites/default/files/uploads/tint2-1.png) - -[Tint2][4] is a lightweight panel and taskbar that provides a consistent experience with any window manager. It is included with most distributions, so it is as easy to install as any other package. - -It includes two programs, Tint2 and Tint2conf. At first launch, Tint2 starts with its default layout and theme. The default configuration includes multiple web browsers, the tint2conf program, a taskbar, and a system tray. - -![](https://opensource.com/sites/default/files/uploads/tint2-2.png) - -Launching the configuration tool allows you to select from the included themes and customize the top, bottom, and sides of the screen. I recommend starting with the theme that is closest to what you want and customizing from there. - -![](https://opensource.com/sites/default/files/uploads/tint2-3.png) - -Within the themes, you can customize where panel items are placed as well as background and font options for every item on the panel. You can also add and remove items from the launcher. - -![](https://opensource.com/sites/default/files/uploads/tint2-4.png) - -Tint2 is a lightweight taskbar that helps you get to the tools you need quickly and efficiently. It is highly customizable, unobtrusive (unless the user wants it not to be), and compatible with almost any window manager on a Linux desktop. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/productivity-tool-tint2 - -作者:[Kevin Sonney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ksonney (Kevin Sonney) -[b]: https://github.com/lujun9972 -[1]: http://openbox.org/wiki/Main_Page -[2]: https://i3wm.org/ -[3]: https://awesomewm.org/ -[4]: https://gitlab.com/o9000/tint2 diff --git a/translated/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md b/translated/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md new file mode 100644 index 0000000000..ef58de9fe5 --- /dev/null +++ b/translated/tech/20190126 Get started with Tint2, an open source taskbar for Linux.md @@ -0,0 +1,59 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Tint2, an open source taskbar for Linux) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-tint2) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +开始使用 Tint2,一款 Linux 中的开源任务栏 +====== + +Tint2 是我们在开源工具系列中的第 14 个工具,它将在 2019 年提高你的工作效率,能在任何窗口管理器中提供一致的用户体验。 + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl) + +每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。 + +这是我挑选出的 19 个新的(或者对你而言新的)开源工具中的第 14个工具来帮助你在 2019 年更有效率。 + +### Tint2 + +让我提高工作效率的最佳方法之一是使用尽可能不让我分心的干净界面。作为 Linux 用户,这意味着使用一种最小的窗口管理器,如 [Openbox][1]、[i3][2] 或 [Awesome][3]。它们每种都有让我更有效率的自定义选项。但让我失望的一件事是,它们都没有一致的配置,所以我不得不经常重新调整我的窗口管理器。 + +![](https://opensource.com/sites/default/files/uploads/tint2-1.png) + +[Tint2][4] 是一个轻量级面板和任务栏,它可以为任何窗口管理器提供一致的体验。它包含在大多数发行版中,因此它与任何其他软件包一样易于安装。 + +它包括两个程序,Tint2 和 Tint2conf。首次启动时,Tint2 以默认布局和主题启动。默认配置包括多个 Web 浏览器、tint2conf 程序,任务栏和系统托盘。 + +![](https://opensource.com/sites/default/files/uploads/tint2-2.png) + +启动配置工具能让你选择主题并自定义屏幕的顶部、底部和侧边栏。我建议从最接近你想要的主题开始,然后从那里进行自定义。 + +![](https://opensource.com/sites/default/files/uploads/tint2-3.png) + +在主题中,你可以自定义面板项目的位置以及面板上每个项目的背景和字体选项。你还可以在启动器中添加和删除项目。 + +![](https://opensource.com/sites/default/files/uploads/tint2-4.png) + +Tint2 是一个轻量级的任务栏,可以帮助你快速有效地获得所需的工具。它是高度可定制的,不显眼的 (除非用户不希望这样),并且几乎与 Linux 桌面中的任何窗口管理器兼容。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-tint2 + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: http://openbox.org/wiki/Main_Page +[2]: https://i3wm.org/ +[3]: https://awesomewm.org/ +[4]: https://gitlab.com/o9000/tint2 \ No newline at end of file From 3448948a48958daaa56b0246209b9d2d333d67dc Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 1 Feb 2019 10:36:22 +0800 Subject: [PATCH 121/164] translating --- .../tech/20190128 3 simple and useful GNOME Shell extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md b/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md index c22feddf01..d7384030c5 100644 --- a/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md +++ b/sources/tech/20190128 3 simple and useful GNOME Shell extensions.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 6c2a93dfe88605070fc6fb14c5cdab4cb6b08cf0 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 11:52:47 +0800 Subject: [PATCH 122/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190129=20Create?= =?UTF-8?q?=20an=20online=20store=20with=20this=20Java-based=20framework?= =?UTF-8?q?=20sources/tech/20190129=20Create=20an=20online=20store=20with?= =?UTF-8?q?=20this=20Java-based=20framework.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ne store with this Java-based framework.md | 235 ++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 sources/tech/20190129 Create an online store with this Java-based framework.md diff --git a/sources/tech/20190129 Create an online store with this Java-based framework.md b/sources/tech/20190129 Create an online store with this Java-based framework.md new file mode 100644 index 0000000000..b72a8551de --- /dev/null +++ b/sources/tech/20190129 Create an online store with this Java-based framework.md @@ -0,0 +1,235 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Create an online store with this Java-based framework) +[#]: via: (https://opensource.com/article/19/1/scipio-erp) +[#]: author: (Paul Piper https://opensource.com/users/madppiper) + +Create an online store with this Java-based framework +====== +Scipio ERP comes with a large range of applications and functionality. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_whitehurst_money.png?itok=ls-SOzM0) + +So you want to sell products or services online, but either can't find a fitting software or think customization would be too costly? [Scipio ERP][1] may just be what you are looking for. + +Scipio ERP is a Java-based open source e-commerce framework that comes with a large range of applications and functionality. The project was forked from [Apache OFBiz][2] in 2014 with a clear focus on better customization and a more modern appeal. The e-commerce component is quite extensive and works in a multi-store setup, internationally, and with a wide range of product configurations, and it's also compatible with modern HTML frameworks. The software also provides standard applications for many other business cases, such as accounting, warehouse management, or sales force automation. It's all highly standardized and therefore easy to customize, which is great if you are looking for more than a virtual cart. + +The system makes it very easy to keep up with modern web standards, too. All screens are constructed using the system's "[templating toolkit][3]," an easy-to-learn macro set that separates HTML from all applications. Because of it, every application is already standardized to the core. Sounds confusing? It really isn't—it all looks a lot like HTML, but you write a lot less of it. + +### Initial setup + +Before you get started, make sure you have Java 1.8 (or greater) SDK and a Git client installed. Got it? Great! Next, check out the master branch from GitHub: + +``` +git clone https://github.com/ilscipio/scipio-erp.git +cd scipio-erp +git checkout master +``` + +To set up the system, simply run **./install.sh** and select either option from the command line. Throughout development, it is best to stick to an **installation for development** (Option 1), which will also install a range of demo data. For professional installations, you can modify the initial config data ("seed data") so it will automatically set up the company and catalog data for you. By default, the system will run with an internal database, but it [can also be configured][4] with a wide range of relational databases such as PostgreSQL and MariaDB. + +![Setup wizard][6] + +Follow the setup wizard to complete your initial configuration, + +Start the system with **./start.sh** and head over to **** to complete the configuration. If you installed with demo data, you can log in with username **admin** and password **scipio**. During the setup wizard, you can set up a company profile, accounting, a warehouse, your product catalog, your online store, and additional user profiles. Keep the website entries on the product store configuration screen for now. The system allows you to run multiple webstores with different underlying code; unless you want to do that, it is easiest to stick to the defaults. + +Congratulations, you just installed Scipio ERP! Play around with the screens for a minute or two to get a feel for the functionality. + +### Shortcuts + +Before you jump into the customization, here are a few handy commands that will help you along the way: + + * Create a shop-override: **./ant create-component-shop-override** + * Create a new component: **./ant create-component** + * Create a new theme component: **./ant create-theme** + * Create admin user: **./ant create-admin-user-login** + * Various other utility functions: **./ant -p** + * Utility to install & update add-ons: **./git-addons help** + + + +Also, make a mental note of the following locations: + + * Scripts to run Scipio as a service: **/tools/scripts/** + * Log output directory: **/runtime/logs** + * Admin application: **** + * E-commerce application: **** + + + +Last, Scipio ERP structures all code in the following five major directories: + + * Framework: framework-related sources, the application server, generic screens, and configurations + * Applications: core applications + * Addons: third-party extensions + * Themes: modifies the look and feel + * Hot-deploy: your own components + + + +Aside from a few configurations, you will be working within the hot-deploy and themes directories. + +### Webstore customizations + +To really make the system your own, start thinking about [components][7]. Components are a modular approach to override, extend, and add to the system. Think of components as self-contained web modules that capture information on databases ([entity][8]), functions ([services][9]), screens ([views][10]), [events and actions][11], and web applications. Thanks to components, you can add your own code while remaining compatible with the original sources. + +Run **./ant create-component-shop-override** and follow the steps to create your webstore component. A new directory will be created inside of the hot-deploy directory, which extends and overrides the original e-commerce application. + +![component directory structure][13] + +A typical component directory structure. + +Your component will have the following directory structure: + + * config: configurations + * data: seed data + * entitydef: database table definitions + * script: Groovy script location + * servicedef: service definitions + * src: Java classes + * webapp: your web application + * widget: screen definitions + + + +Additionally, the **ivy.xml** file allows you to add Maven libraries to the build process and the **ofbiz-component.xml** file defines the overall component and web application structure. Apart from the obvious, you will also find a **controller.xml** file inside the web apps' **WEB-INF** directory. This allows you to define request entries and connect them to events and screens. For screens alone, you can also use the built-in CMS functionality, but stick to the core mechanics first. Familiarize yourself with **/applications/shop/** before introducing changes. + +#### Adding custom screens + +Remember the [templating toolkit][3]? You will find it used on every screen. Think of it as a set of easy-to-learn macros that structure all content. Here's an example: + +``` +<@section title="Title"> +    <@heading id="slider">Slider +    <@row> +        <@cell columns=6> +            <@slider id="" class="" controls=true indicator=true> +                <@slide link="#" image="https://placehold.it/800x300">Just some content… +                <@slide title="This is a title" link="#" image="https://placehold.it/800x300"> +            +        +        <@cell columns=6>Second column +    + +``` + +Not too difficult, right? Meanwhile, themes contain the HTML definitions and styles. This hands the power over to your front-end developers, who can define the output of each macro and otherwise stick to their own build tools for development. + +Let's give it a quick try. First, define a request on your own webstore. You will modify the code for this. A built-in CMS is also available at **** , which allows you to create new templates and screens in a much more efficient way. It is fully compatible with the templating toolkit and comes with example templates that can be adopted to your preferences. But since we are trying to understand the system here, let's go with the more complicated way first. + +Open the **[controller.xml][14]** file inside of your shop's webapp directory. The controller keeps track of request events and performs actions accordingly. The following will create a new request under **/shop/test** : + +``` + + +      +      + +``` + +You can define multiple responses and, if you want, you could use an event or a service call inside the request to determine which response you may want to use. I opted for a response of type "view." A view is a rendered response; other types are request-redirects, forwards, and alike. The system comes with various renderers and allows you to determine the output later; to do so, add the following: + +``` + + +``` + +Replace **my-component** with your own component name. Then you can define your very first screen by adding the following inside the tags within the **widget/CommonScreens.xml** file: + +``` + +       
+            +            +            +                +                    +                        +                    +                +            +       
+   
+``` + +Screens are actually quite modular and consist of multiple elements ([widgets, actions, and decorators][15]). For the sake of simplicity, leave this as it is for now, and complete the new webpage by adding your very first templating toolkit file. For that, create a new **webapp/mycomponent/test/test.ftl** file and add the following: + +``` +<@alert type="info">Success! +``` + +![Custom screen][17] + +A custom screen. + +Open **** and marvel at your own accomplishments. + +#### Custom themes + +Modify the look and feel of the shop by creating your very own theme. All themes can be found as components inside of the themes folder. Run **./ant create-theme** to add your own. + +![theme component layout][19] + +A typical theme component layout. + +Here's a list of the most important directories and files: + + * Theme configuration: **data/*ThemeData.xml** + * Theme-specific wrapping HTML: **includes/*.ftl** + * Templating Toolkit HTML definition: **includes/themeTemplate.ftl** + * CSS class definition: **includes/themeStyles.ftl** + * CSS framework: **webapp/theme-title/*** + + + +Take a quick look at the Metro theme in the toolkit; it uses the Foundation CSS framework and makes use of all the things above. Afterwards, set up your own theme inside your newly constructed **webapp/theme-title** directory and start developing. The Foundation-shop theme is a very simple shop-specific theme implementation that you can use as a basis for your own work. + +Voila! You have set up your own online store and are ready to customize! + +![Finished Scipio ERP shop][21] + +A finished shop based on Scipio ERP. + +### What's next? + +Scipio ERP is a powerful framework that simplifies the development of complex e-commerce applications. For a more complete understanding, check out the project [documentation][7], try the [online demo][22], or [join the community][23]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/scipio-erp + +作者:[Paul Piper][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/madppiper +[b]: https://github.com/lujun9972 +[1]: https://www.scipioerp.com +[2]: https://ofbiz.apache.org/ +[3]: https://www.scipioerp.com/community/developer/freemarker-macros/ +[4]: https://www.scipioerp.com/community/developer/installation-configuration/configuration/#database-configuration +[5]: /file/419711 +[6]: https://opensource.com/sites/default/files/uploads/setup_step5_sm.jpg (Setup wizard) +[7]: https://www.scipioerp.com/community/developer/architecture/components/ +[8]: https://www.scipioerp.com/community/developer/entities/ +[9]: https://www.scipioerp.com/community/developer/services/ +[10]: https://www.scipioerp.com/community/developer/views-requests/ +[11]: https://www.scipioerp.com/community/developer/events-actions/ +[12]: /file/419716 +[13]: https://opensource.com/sites/default/files/uploads/component_structure.jpg (component directory structure) +[14]: https://www.scipioerp.com/community/developer/views-requests/request-controller/ +[15]: https://www.scipioerp.com/community/developer/views-requests/screen-widgets-decorators/ +[16]: /file/419721 +[17]: https://opensource.com/sites/default/files/uploads/success_screen_sm.jpg (Custom screen) +[18]: /file/419726 +[19]: https://opensource.com/sites/default/files/uploads/theme_structure.jpg (theme component layout) +[20]: /file/419731 +[21]: https://opensource.com/sites/default/files/uploads/finished_shop_1_sm.jpg (Finished Scipio ERP shop) +[22]: https://www.scipioerp.com/demo/ +[23]: https://forum.scipioerp.com/ From df0892f4570d2e975b7d1a65a79c6a8081ffe4e0 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 11:55:02 +0800 Subject: [PATCH 123/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190129=20Get=20?= =?UTF-8?q?started=20with=20gPodder,=20an=20open=20source=20podcast=20clie?= =?UTF-8?q?nt=20sources/tech/20190129=20Get=20started=20with=20gPodder,=20?= =?UTF-8?q?an=20open=20source=20podcast=20client.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... gPodder, an open source podcast client.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/tech/20190129 Get started with gPodder, an open source podcast client.md diff --git a/sources/tech/20190129 Get started with gPodder, an open source podcast client.md b/sources/tech/20190129 Get started with gPodder, an open source podcast client.md new file mode 100644 index 0000000000..ca1556e16d --- /dev/null +++ b/sources/tech/20190129 Get started with gPodder, an open source podcast client.md @@ -0,0 +1,64 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with gPodder, an open source podcast client) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-gpodder) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with gPodder, an open source podcast client +====== +Keep your podcasts synced across your devices with gPodder, the 17th in our series on open source tools that will make you more productive in 2019. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/podcast-record-microphone.png?itok=8yUDOywf) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 17th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### gPodder + +I like podcasts. Heck, I like them so much I record three of them (you can find links to them in [my profile][1]). I learn a lot from podcasts and play them in the background when I'm working. But keeping them in sync between multiple desktops and mobile devices can be a bit of a challenge. + +[gPodder][2] is a simple, cross-platform podcast downloader, player, and sync tool. It supports RSS feeds, [FeedBurner][3], [YouTube][4], and [SoundCloud][5], and it also has an open source sync service that you can run if you want. gPodder doesn't do podcast playback; instead, it uses your audio or video player of choice. + +![](https://opensource.com/sites/default/files/uploads/gpodder-1.png) + +Installing gPodder is very straightforward. Installers are available for Windows and MacOS, and packages are available for major Linux distributions. If it isn't available in your distribution, you can run it directly from a Git checkout. With the "Add Podcasts via URL" menu option, you can enter a podcast's RSS feed URL or one of the "special" URLs for the other services. gPodder will fetch a list of episodes and present a dialog where you can select which episodes to download or mark old episodes on the list. + +![](https://opensource.com/sites/default/files/uploads/gpodder-2.png) + +One of its nicer features is that if a URL is already in your clipboard, gPodder will automatically place it in its URL field, which makes it really easy to add a new podcast to your list. If you already have an OPML file of podcast feeds, you can upload and import it. There is also a discovery option that allows you to search for podcasts on [gPodder.net][6], the free and open source podcast listing site by the people who write and maintain gPodder. + +![](https://opensource.com/sites/default/files/uploads/gpodder-3.png) + +A [mygpo][7] server synchronizes podcasts between devices. By default, gPodder uses [gPodder.net][8]'s servers, but you can change this in the configuration files if want to run your own (be aware that you'll have to modify the configuration file directly). Syncing allows you to keep your lists consistent between desktops and mobile devices. This is very useful if you listen to podcasts on multiple devices (for example, I listen on my work computer, home computer, and mobile phone), as it means no matter where you are, you have the most recent lists of podcasts and episodes without having to set things up again and again. + +![](https://opensource.com/sites/default/files/uploads/gpodder-4.png) + +Clicking on a podcast episode will bring up the text post associated with it, and clicking "Play" will launch your device's default audio or video player. If you want to use something other than the default, you can change this in gPodder's configuration settings. + +gPodder makes it simple to find, download, and listen to podcasts, synchronize them across devices, and access a lot of other features in an easy-to-use interface. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-gpodder + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/users/ksonney +[2]: https://gpodder.github.io/ +[3]: https://feedburner.google.com/ +[4]: https://youtube.com +[5]: https://soundcloud.com/ +[6]: http://gpodder.net +[7]: https://github.com/gpodder/mygpo +[8]: http://gPodder.net From 56e85104cae6376ad263c550e77622bbcd97e6bd Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 11:56:09 +0800 Subject: [PATCH 124/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190129=20More?= =?UTF-8?q?=20About=20Angle=20Brackets=20in=20Bash=20sources/tech/20190129?= =?UTF-8?q?=20More=20About=20Angle=20Brackets=20in=20Bash.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...90129 More About Angle Brackets in Bash.md | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 sources/tech/20190129 More About Angle Brackets in Bash.md diff --git a/sources/tech/20190129 More About Angle Brackets in Bash.md b/sources/tech/20190129 More About Angle Brackets in Bash.md new file mode 100644 index 0000000000..6a733a1ccc --- /dev/null +++ b/sources/tech/20190129 More About Angle Brackets in Bash.md @@ -0,0 +1,88 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (More About Angle Brackets in Bash) +[#]: via: (https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash) +[#]: author: (Paul Brown https://www.linux.com/users/bro66) + +More About Angle Brackets in Bash +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/bash-angles.png?itok=mVFnxPzF) + +In the previous article, we [introduced the subject of angle brackets][1] (`< >`) and demonstrated some of their uses. Here, we'll look at the topic from a few more angles. Let's dive right in. + +You can use `<` to trick a tool into believing the output of a command is data from a file. + +Let's say you are not sure your backup is complete, and you want to check that a certain directory contains all the files copied over from the original. You can try this: + +``` +diff <(ls /original/dir/) <(ls /backup/dir/) +``` + +[`diff`][2] is a tool that typically compares two text files line by line, looking for differences. Here it gets the output from two `ls` commands and treats them as if coming from a file and compares them as such. + +Note that there is no space between the `<` and the `(...)`. + +Running that on the original and backup of a directory where I save pretty pictures, I get: + +``` +diff <(ls /My/Pictures/) <(ls /My/backup/Pictures/) 5d4 < Dv7bIIeUUAAD1Fc.jpg:large.jpg +``` + +The `<` in the output is telling me that there is file ( _Dv7bIIeUUAAD1Fc.jpg:large.jpg_ ) on the left side of the comparison (in _/My/Pictures_ ) that is not on the right side of the comparison (in _/My/backup/Pictures_ ), which means copying over has failed for some reason. If `diff` didn't cough up any output, it would mean that the list of files were the same. + +So, you may be wondering, if you can take the output of a command or command line, make it look like the contents of a file, and feed it to an instruction that is expecting a file, that means that in the _sorting by favorite actor_ example from above, you could've done away with the intermediate file and just piped the output from the loop into `sort`. + +In short, yep! The line: + +``` +sort -r <(while read -r name surname films;do echo $films $name $surname ; done < CBactors) +``` + +does the trick nicely. + +### Here string! Good string! + +There is one more case for redirecting data using angle brackets (or arrows, or whatever you want to call them). + +You may be familiar with the practice of passing variables to commands using `echo` and a pipe (`|`). Say you want to convert a variable containing a string to uppercase characters because... I don't know... YOU LIKE SHOUTING A LOT. You could do this: + +``` +myvar="Hello World" echo $myvar | tr '[:lower:]' '[:upper:]' HELLO WORLD +``` + +The [`tr`][3] command _tr_ anslates strings to different formats. In the example above, you are telling `tr` to change all the lowercase characters that come along in the string to uppercase characters. + +It is important to know that you are not passing on the variable, but only its contents, that is, the string " _Hello World_ ". This is called the _here string_ , as in " _it is here, in this context, that we know what string we are dealing with_ ". But there is shorter, clearer, and all round better way of delivering _here strings_ to commands. Using + +``` +tr '[:lower:]' '[:upper:]' <<< $myvar +``` + +does the same thing with no need to use echo or a pipe. It also uses angle brackets, which is the whole obsessive point of this article. + +### Conclusion + +Again, Bash proves to give you lots of options with very little. I mean, who would've thunk that you could do so much with two simple characters like `<` and `>`? + +The thing is we aren't done. There are plenty of more characters that bring meaning to chains of Bash instructions. Without some background, they can make shell commands look like gibberish. Hopefully, post by post, we can help you decipher them. Until next time! + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash + +作者:[Paul Brown][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/bro66 +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash +[2]: https://linux.die.net/man/1/diff +[3]: https://linux.die.net/man/1/tr From b3410e4db1b88a828d3464b6983ff932fe14bde8 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 11:57:52 +0800 Subject: [PATCH 125/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190128=20Using?= =?UTF-8?q?=20more=20to=20view=20text=20files=20at=20the=20Linux=20command?= =?UTF-8?q?=20line=20sources/tech/20190128=20Using=20more=20to=20view=20te?= =?UTF-8?q?xt=20files=20at=20the=20Linux=20command=20line.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ew text files at the Linux command line.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sources/tech/20190128 Using more to view text files at the Linux command line.md diff --git a/sources/tech/20190128 Using more to view text files at the Linux command line.md b/sources/tech/20190128 Using more to view text files at the Linux command line.md new file mode 100644 index 0000000000..872df3eba8 --- /dev/null +++ b/sources/tech/20190128 Using more to view text files at the Linux command line.md @@ -0,0 +1,92 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using more to view text files at the Linux command line) +[#]: via: (https://opensource.com/article/19/1/more-text-files-linux) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) + +Using more to view text files at the Linux command line +====== +Text files and Linux go hand in hand. Or so it seems. But how you view those text files depends on what tools you're comfortable with. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE) + +There are a number of utilities that enable you to view text files when you're at the command line. One of them is [**more**][1]. + +**more** is similar to another tool I wrote about called **[less][2]**. The main difference is that **more** only allows you to move forward in a file. + +While that may seem limiting, it has some useful features that are good to know about. Let's take a quick look at what **more** can do and how to use it. + +### The basics + +Let's say you have a text file and want to read it at the command line. Just open the terminal, pop into the directory that contains the file, and type this command: + +``` +more +``` + +For example, **more jekyll-article.md**. + +![](https://opensource.com/sites/default/files/uploads/more-viewing-file.png) + +Press the Spacebar on your keyboard to move through the file or press **q** to quit. + +If you want to search for some text in the file, press the **/** key followed by the word or term you want to find. For example, to find the phrase terminal, type: + +``` +/terminal +``` + +![](https://opensource.com/sites/default/files/uploads/more-searching.png) + +Search is case-sensitive. Typing Terminal isn't the same as typing terminal. + +### Using more with other utilities + +You can pipe text from other command line utilities into **more**. Why do that? Because sometimes the text that those tools spew out spans more than one page. + +To do that, type the command and any options, followed by the pipe symbol ( **|** ), followed by **more**. For example, let's say you have a directory that has a large number of files in it. You can use **more** with the **ls** command to get a full view of the contents of the directory: + +``` +ls | more +``` + +![](https://opensource.com/sites/default/files/uploads/more-with_ls_cmd.png) + +You can also use **more** with the **grep** command to find text in multiple files. In this example, I use **grep** to find the text productivity in multiple source files for my articles: + +``` +**grep ‘productivity’ core.md Dict.md lctt2014.md lctt2016.md lctt2018.md README.md | more** +``` + +![](https://opensource.com/sites/default/files/uploads/more-with_grep_cmd.png) + +Another utility you can combine with **more** is **ps** (which lists processes that are running on your system). Again, this comes in handy when there are a large number of processes running on your system and you need a view of all of them—for example, to find one that you need to kill. To do that, use this command: + +``` +ps -u scott | more +``` + +Note that you'd replace scott with your username. + +![](https://opensource.com/sites/default/files/uploads/more-with_ps_cmd.png) + +As I mentioned at the beginning of this article, **more** is easy to use. It's definitely not as flexible as its cousin **less** , but it can be useful to know. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/more-text-files-linux + +作者:[Scott Nesbitt][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/scottnesbitt +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/More_(command) +[2]: https://opensource.com/article/18/4/using-less-view-text-files-command-line From a93fb1c5cc5bf6a2815b874d11850107234b1598 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 12:12:16 +0800 Subject: [PATCH 126/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190117=20How=20?= =?UTF-8?q?to=20Update/Change=20Users=20Password=20in=20Linux=20Using=20Di?= =?UTF-8?q?fferent=20Ways=20sources/tech/20190117=20How=20to=20Update-Chan?= =?UTF-8?q?ge=20Users=20Password=20in=20Linux=20Using=20Different=20Ways.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Password in Linux Using Different Ways.md | 251 ++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md diff --git a/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md b/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md new file mode 100644 index 0000000000..d3ca9cb0ab --- /dev/null +++ b/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md @@ -0,0 +1,251 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Update/Change Users Password in Linux Using Different Ways) +[#]: via: (https://www.2daygeek.com/linux-passwd-chpasswd-command-set-update-change-users-password-in-linux-using-shell-script/) +[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/) + +How to Update/Change Users Password in Linux Using Different Ways +====== + +It’s a basic thing to set a user password whenever you create an user account in Linux. + +Everybody uses passwd command followed by the user name `passwd USERNAME` to set a password for a user. + +Make sure you have to set a hard and guess password that will help you to make the system more secure. + +I mean to say, it should be the combination of Alphabets, Symbols and numbers. + +Also, i advise you to change the password at least once in a month for security reason. + +When you use the passwd command it will ask you to enter the password twice to set it. It’s a native method to set a user password. + +If you don’t want to update the password twice and would like to do this in different way? + +Yes, we can. There will be a possibility to do. + +If you are working as a Linux admin you might have asked the below questions many times. + +Some of you may or may not got answer for these questions. + +Whatever it’s, don’t worry we are here to answer your all questions. + + * How to Update/Change Users Password in Single Command? + * How to Update/Change a Same Password for Multiple users in Linux? + * How to Update/Change Multiple Users Password in Linux? + * How to Update/Change Password for Multiple Users in Linux? + * How to Update/Change Different Password for Multiple Users in Linux? + * How to Update/Change Users Password in Multiple Linux Servers? + * How to Update/Change Multiple Users Password in Multiple Linux Servers? + + + +### Method-1: Using passwd Command + +passwd command is a standard method to set or update or change password for users in Linux. The below way is a standard method to do it. + +``` +# passwd renu +Changing password for user renu. +New password: +BAD PASSWORD: The password contains the user name in some form +Retype new password: +passwd: all authentication tokens updated successfully. +``` + +Run the following command if you would like to set or change password with single command. This allow users to update password in a single command. + +``` +# echo "new_password" | passwd --stdin thanu +Changing password for user thanu. +passwd: all authentication tokens updated successfully. +``` + +### Method-2: Using chpasswd Command + +chpasswd is an another command will allow us to set or update or change password for users in Linux. Use the following format if you would like to use chpasswd command to change password for user in a single command. + +``` +# echo "thanu:new_password" | chpasswd +``` + +### Method-3: How to Set Different Password for Multiple Users + +Use the below script if you would like to set or update or change a password for multiple users in Linux with different password. + +To do so, first we need to get a users list by using the following command. The below command will list the users who’s having `/home` directory and redirect the output to `user-list.txt` file. + +``` +# cat /etc/passwd | grep "/home" | cut -d":" -f1 > user-list.txt +``` + +List out the users using cat command. Remove the user from the list if you don’t want to reset the password for the specific user. + +``` +# cat user-list.txt +centos +magi +daygeek +thanu +renu +``` + +Create a following small shell script to achieve this. + +``` +# vi password-update.sh + +#!/bin/sh +for user in `more user-list.txt` +do +echo "[email protected]" | passwd --stdin "$user" +chage -d 0 $user +done +``` + +Set an executable permission to `password-update.sh` file. + +``` +# chmod +x password-update.sh +``` + +Finally run the script to achieve this. + +``` +# ./password-up.sh + +magi +Changing password for user magi. +passwd: all authentication tokens updated successfully. +daygeek +Changing password for user daygeek. +passwd: all authentication tokens updated successfully. +thanu +Changing password for user thanu. +passwd: all authentication tokens updated successfully. +renu +Changing password for user renu. +passwd: all authentication tokens updated successfully. +``` + +### Method-4: How to Set a Same Password for Multiple Users + +Use the below script if you would like to set or update or change a same password for multiple users in Linux. + +``` +# vi password-update.sh + +#!/bin/sh +for user in `more user-list.txt` +do +echo "new_password" | passwd --stdin "$user" +chage -d 0 $user +done +``` + +### Method-5: How to Change User password in Multiple Servers + +Use the following script if you want to change a user password in multiple servers. In my case, we are going to change a password for `renu` user. Make sure you have to give the user name which you want to update the password instead of us. + +Make sure you have to update the servers list into `server-list.txt` file. Each server should be in separate line. + +``` +# vi password-update.sh + +#!/bin/bash +for server in `cat server-list.txt` +do +ssh [email protected]$server 'passwd --stdin renu < Date: Thu, 31 Jan 2019 13:32:48 +0800 Subject: [PATCH 127/164] Check translation of An Introduction to Go. --- .../tech/20181224 An Introduction to Go.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20181224 An Introduction to Go.md b/translated/tech/20181224 An Introduction to Go.md index a9f50f6770..04adb076dc 100644 --- a/translated/tech/20181224 An Introduction to Go.md +++ b/translated/tech/20181224 An Introduction to Go.md @@ -12,11 +12,11 @@ Go 简介 (以下内容是我的硕士论文的摘录,几乎整个 2.1 章节,向具有 CS 背景的人快速介绍 Go) -Go 是一门用于并发编程的命令式编程语言,它主要由创造者 Google 进行开发,最初主要由 Robert Griesemer、Rob Pike 和 Ken Thompson开发。这门语言的设计起始于 2017 年,并在 2019 年推出最初版本;而第一个稳定版本是 2012 年发布的 1.0。 +Go 是一门用于并发编程的命令式编程语言,它主要由创造者 Google 进行开发,最初主要由 Robert Griesemer、Rob Pike 和 Ken Thompson开发。这门语言的设计起始于 2017 年,并在 2019 年推出最初版本;而第一个稳定版本是 2012 年发布的 1.0 版本。 -Go 有 C 风格语法(没有预处理器),垃圾回收机制,而且类似它在贝尔实验室里被开发出来的前辈们,Newsqueak (Rob Pike)、Alef (Phil Winterbottom) 和 Inferno (Pike, Ritchie, et al.),使用所谓的 goroutines 和 channels(一种基于 Hoare 的“通信顺序进程”理论的协程)提供内建的并发支持。 +Go 有 C 风格的语法(没有预处理器),垃圾回收机制,而且类似它在贝尔实验室里被开发出来的前辈们:Newsqueak (Rob Pike)、Alef (Phil Winterbottom) 和 Inferno (Pike, Ritchie, et al.),使用所谓的 goroutines 和信道(一种基于 Hoare 的“通信顺序进程”理论的协程)提供内建的并发支持。 -Go 程序以包的形式组织。包本质是一个包含 Go 文件的文件夹。包内的所有文件共享相同的命名空间,而包内的符号有两种可见行:以大写字母开头的符号对于其他包是可见,而其他符号则是该包私有的: +Go 程序以包的形式组织。包本质是一个包含 Go 文件的文件夹。包内的所有文件共享相同的命名空间,而包内的符号有两种可见性:以大写字母开头的符号对于其他包是可见,而其他符号则是该包私有的: ``` func PublicFunction() { @@ -36,11 +36,11 @@ Go 有一个相当简单的类型系统:没有子类型(但有类型转换 2. `struct` - 3. `interface` \- 一类方法 + 3. `interface` \- 一组方法的集合 - 4. `map[K, V]` \- 从键类型到值类型的映射 + 4. `map[K, V]` \- 一个从键类型到值类型的映射 - 5. `[number]Type` \- 一些元素类型组成的数组 + 5. `[number]Type` \- 一些 Type 类型的元素组成的数组 6. `[]Type` \- 某种类型的切片(指向具有长度和功能的数组) @@ -64,7 +64,7 @@ Maps、slices 和 channels 是类似于引用的类型——他们实际上是 #### 类型转换 -类型转换类似于 C 或其他语言中的转换。它们写成这样子: +类型转换类似于 C 或其他语言中的类型转换。它们写成这样子: ``` TypeName(value) @@ -80,7 +80,7 @@ const foo = 1 // 无类型整数常量 const foo int = 1 // int 类型常量 ``` -无类型值可以分为以下几类:`UntypedBool`、`UntypedInt`、`UntypedRune`、`UntypedFloat`、`UntypedComplex`、`UntypedString` 以及 `UntypedNil`(Go 称它们为基础类型,other basic kinds are available for the concrete types like `uint8`)。一个无类型值可以赋值给一个从基础类型中派生的具名类型;例如: +无类型值可以分为以下几类:`UntypedBool`、`UntypedInt`、`UntypedRune`、`UntypedFloat`、`UntypedComplex`、`UntypedString` 以及 `UntypedNil`(Go 称它们为基础类型,其他基础种类可用于具体类型,如 `uint8`)。一个无类型值可以赋值给一个从基础类型中派生的具名类型;例如: ``` type someType int @@ -131,9 +131,9 @@ Go 提供了三个主要的控制了语句:`if`、`switch` 和 `for`。这些 * `switch` 语句可以处理空的表达式(等于 true) - * 默认情况下,Go 不会从一个 case 进入下一个 case(不需要 `break`),在程序块的末尾使用 `fallthrough` 则会进入下一个 case。 + * 默认情况下,Go 不会从一个 case 进入下一个 case(不需要 `break`语句),在程序块的末尾使用 `fallthrough` 则会进入下一个 case。 - * 循环语句 `for` 不止能循环值域:`for key, val := range map { do something }` + * 循环语句 `for` 不仅能循环值域:`for key, val := range map { do something }` ### Goroutines @@ -152,14 +152,14 @@ func main() { ### 信道 -Goroutines 通常同信道结合以提供一种通信顺序进程的扩展。信道是一个并发安全的队列,而且可以缓冲或者不缓冲: +Goroutines 通常和信道结合,用来提供一种通信顺序进程的扩展。信道是一个并发安全的队列,而且可以选择是否缓冲数据: ``` var unbuffered = make(chan int) // 直到数据被读取时完成数据块发送 var buffered = make(chan int, 5) // 最多有 5 个未读取的数据块 ``` -运输符 `<-` 用于同单个信道通信。 +运算符 `<-` 用于和单个信道进行通信。 ``` valueReadFromChannel := <- channel @@ -179,7 +179,7 @@ select { ### `defer` 声明 -Go 提供语句 `defer` 允许函数退出时调用执行预定的函数。它可以用于资源释放,例如: +Go 提供语句 `defer` 允许函数退出时调用执行预定的函数。它可以用于进行资源释放操作,例如: ``` func myFunc(someFile io.ReadCloser) { From 63cc67826e32e4749cefd1ce4e3eac97d85ae85c Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 12:58:04 +0800 Subject: [PATCH 128/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190118=20Secure?= =?UTF-8?q?=20Email=20Service=20Tutanota=20Has=20a=20Desktop=20App=20Now?= =?UTF-8?q?=20sources/tech/20190118=20Secure=20Email=20Service=20Tutanota?= =?UTF-8?q?=20Has=20a=20Desktop=20App=20Now.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Service Tutanota Has a Desktop App Now.md | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 sources/tech/20190118 Secure Email Service Tutanota Has a Desktop App Now.md diff --git a/sources/tech/20190118 Secure Email Service Tutanota Has a Desktop App Now.md b/sources/tech/20190118 Secure Email Service Tutanota Has a Desktop App Now.md new file mode 100644 index 0000000000..f56f1272f2 --- /dev/null +++ b/sources/tech/20190118 Secure Email Service Tutanota Has a Desktop App Now.md @@ -0,0 +1,119 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Secure Email Service Tutanota Has a Desktop App Now) +[#]: via: (https://itsfoss.com/tutanota-desktop) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +Secure Email Service Tutanota Has a Desktop App Now +====== + +[Tutanota][1] recently [announced][2] the release of a desktop app for their email service. The beta is available for Linux, Windows, and macOS. + +### What is Tutanota? + +There are plenty of free, ad-supported email services available online. However, the majority of those email services are not exactly secure or privacy-minded. In this post-[Snowden][3] world, [Tutanota][4] offers a free, secure email service with a focus on privacy. + +Tutanota has a number of eye-catching features, such as: + + * End-to-end encrypted mailbox + * End-to-end encrypted address book + * Automatic end-to-end encrypted emails between users + * End-to-end encrypted emails to any email address with a shared password + * Secure password reset that gives Tutanota absolutely no access + * Strips IP addresses from emails sent and received + * The code that runs Tutanota is [open source][5] + * Two-factor authentication + * Focus on privacy + * Passwords are salted and hashed locally with Bcrypt + * Secure servers located in Germany + * TLS with support for PFS, DMARC, DKIM, DNSSEC, and DANE + * Full-text search of encrypted data executed locally + + + +![][6] +Tutanota on the web + +You can [sign up for an account for free][7]. You can also upgrade your account to get extra features, such as custom domains, custom domain login, domain rules, extra storage, and aliases. They also have accounts available for businesses. + +Tutanota is also available on mobile devices. In fact, it’s [Android app is open source as well][8]. + +This German company is planning to expand beyond email. They hope to offer an encrypted calendar and cloud storage. You can help them reach their goals by [donating][9] via PayPal and cryptocurrency. + +### The New Desktop App from Tutanota + +Tutanota announced the [beta release][2] of the desktop app right before Christmas. They based this app on [Electron][10]. + +![][11] +Tutanota desktop app + +They went the Electron route: + + * to support all three major operating systems with minimum effort. + * to quickly adapt the new desktop clients so that they match new features added to the webmail client. + * to allocate development time to particular desktop features, e.g. offline availability, email import, that will simultaneously be available in all three desktop clients. + + + +Because this is a beta, there are several features missing from the app. The development team at Tutanota is working to add the following features: + + * Email import and synchronization with external mailboxes. This will “enable Tutanota to import emails from external mailboxes and encrypt the data locally on your device before storing it on the Tutanota servers.” + * Offline availability of emails + * Two-factor authentication + + + +### How to Install the Tutanota desktop client? + +![][12]Composing email in Tutanota + +You can [download][2] the beta app directly from Tutanota’s website. They have an [AppImage file for Linux][13], a .exe file for Windows, and a .app file for macOS. You can post any bugs that you encounter to the Tutanota [GitHub account][14]. + +To prove the security of the app, Tutanota signed each version. “The signatures make sure that the desktop clients as well as any updates come directly from us and have not been tampered with.” You can verify the signature using from Tutanota’s [GitHub page][15]. + +Remember, you will need to create a Tutanota account before you can use it. This is email client is designed to work solely with Tutanota. + +### Wrapping up + +I tested out the Tutanota email app on Linux Mint MATE. As to be expected, it was a mirror image of the web app. At this point in time, I don’t see any difference between the desktop app and the web app. The only use case that I can see to use the app now is to have Tutanota in its own window. + +Have you ever used [Tutanota][16]? If not, what is your favorite privacy conscience email service? Let us know in the comments below. + +If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][17]. + +![][18] + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/tutanota-desktop + +作者:[John Paul][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/tutanota-review/ +[2]: https://tutanota.com/blog/posts/desktop-clients/ +[3]: https://en.wikipedia.org/wiki/Edward_Snowden +[4]: https://tutanota.com/ +[5]: https://tutanota.com/blog/posts/open-source-email +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/tutanota2.jpg?resize=800%2C490&ssl=1 +[7]: https://tutanota.com/pricing +[8]: https://itsfoss.com/tutanota-fdroid-release/ +[9]: https://tutanota.com/community +[10]: https://electronjs.org/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/tutanota-app1.png?fit=800%2C486&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/tutanota1.jpg?resize=800%2C405&ssl=1 +[13]: https://itsfoss.com/use-appimage-linux/ +[14]: https://github.com/tutao/tutanota +[15]: https://github.com/tutao/tutanota/blob/master/buildSrc/installerSigner.js +[16]: https://tutanota.com/polo/ +[17]: http://reddit.com/r/linuxusersgroup +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/02/tutanota-featured.png?fit=800%2C450&ssl=1 From ad762dbe2c393a83d639c321453db62cd02288dd Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Fri, 1 Feb 2019 12:58:51 +0800 Subject: [PATCH 129/164] Delete 20181224 An Introduction to Go.md --- .../tech/20181224 An Introduction to Go.md | 278 ------------------ 1 file changed, 278 deletions(-) delete mode 100644 sources/tech/20181224 An Introduction to Go.md diff --git a/sources/tech/20181224 An Introduction to Go.md b/sources/tech/20181224 An Introduction to Go.md deleted file mode 100644 index 5989b6c913..0000000000 --- a/sources/tech/20181224 An Introduction to Go.md +++ /dev/null @@ -1,278 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (LazyWolfLin) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (An Introduction to Go) -[#]: via: (https://blog.jak-linux.org/2018/12/24/introduction-to-go/) -[#]: author: (Julian Andres Klode https://blog.jak-linux.org/) - -An Introduction to Go -====== - -(What follows is an excerpt from my master’s thesis, almost all of section 2.1, quickly introducing Go to people familiar with CS) - -Go is an imperative programming language for concurrent programming created at and mainly developed by Google, initially mostly by Robert Griesemer, Rob Pike, and Ken Thompson. Design of the language started in 2007, and an initial version was released in 2009; with the first stable version, 1.0 released in 2012 . - -Go has a C-like syntax (without a preprocessor), garbage collection, and, like its predecessors devloped at Bell Labs – Newsqueak (Rob Pike), Alef (Phil Winterbottom), and Inferno (Pike, Ritchie, et al.) – provides built-in support for concurrency using so-called goroutines and channels, a form of co-routines, based on the idea of Hoare’s ‘Communicating Sequential Processes’ . - -Go programs are organised in packages. A package is essentially a directory containing Go files. All files in a package share the same namespace, and there are two visibilities for symbols in a package: Symbols starting with an upper case character are visible to other packages, others are private to the package: - -``` -func PublicFunction() { - fmt.Println("Hello world") -} - -func privateFunction() { - fmt.Println("Hello package") -} -``` - -### Types - -Go has a fairly simple type system: There is no subtyping (but there are conversions), no generics, no polymorphic functions, and there are only a few basic categories of types: - - 1. base types: `int`, `int64`, `int8`, `uint`, `float32`, `float64`, etc. - - 2. `struct` - - 3. `interface` \- a set of methods - - 4. `map[K, V]` \- a map from a key type to a value type - - 5. `[number]Type` \- an array of some element type - - 6. `[]Type` \- a slice (pointer to array with length and capability) of some type - - 7. `chan Type` \- a thread-safe queue - - 8. pointer `*T` to some other type - - 9. functions - - 10. named type - aliases for other types that may have associated methods: - -``` -type T struct { foo int } -type T *T -type T OtherNamedType -``` - -Named types are mostly distinct from their underlying types, so you cannot assign them to each other, but some operators like `+` do work on objects of named types with an underlying numerical type (so you could add two `T` in the example above). - - -Maps, slices, and channels are reference-like types - they essentially are structs containing pointers. Other types are passed by value (copied), including arrays (which have a fixed length and are copied). - -#### Conversions - -Conversions are the similar to casts in C and other languages. They are written like this: - -``` -TypeName(value) -``` - -#### Constants - -Go has “untyped” literals and constants. - -``` -1 // untyped integer literal -const foo = 1 // untyped integer constant -const foo int = 1 // int constant -``` - -Untyped values are classified into the following categories: `UntypedBool`, `UntypedInt`, `UntypedRune`, `UntypedFloat`, `UntypedComplex`, `UntypedString`, and `UntypedNil` (Go calls them basic kinds, other basic kinds are available for the concrete types like `uint8`). An untyped value can be assigned to a named type derived from a base type; for example: - -``` -type someType int - -const untyped = 2 // UntypedInt -const bar someType = untyped // OK: untyped can be assigned to someType -const typed int = 2 // int -const bar2 someType = typed // error: int cannot be assigned to someType -``` - -### Interfaces and ‘objects’ - -As mentioned before, interfaces are a set of methods. Go is not an object-oriented language per se, but it has some support for associating methods with named types: When declaring a function, a receiver can be provided - a receiver is an additional function argument that is passed before the function and involved in the function lookup, like this: - -``` -type SomeType struct { ... } - -func (s *SomeType) MyMethod() { -} - -func main() { - var s SomeType - s.MyMethod() -} -``` - -An object implements an interface if it implements all methods; for example, the following interface `MyMethoder` is implemented by `*SomeType` (note the pointer), and values of `*SomeType` can thus be used as values of `MyMethoder`. The most basic interface is `interface{}`, that is an interface with an empty method set - any object satisfies that interface. - -``` -type MyMethoder interface { - MyMethod() -} -``` - -There are some restrictions on valid receiver types; for example, while a named type could be a pointer (for example, `type MyIntPointer *int`), such a type is not a valid receiver type. - -### Control flow - -Go provides three primary statements for control flow: `if`, `switch`, and `for`. The statements are fairly similar to their equivalent in other C-like languages, with some exceptions: - - * There are no parentheses around conditions, so it is `if a == b {}`, not `if (a == b) {}`. The braces are mandatory. - - * All of them can have initialisers, like this - -`if result, err := someFunction(); err == nil { // use result }` - - * The `switch` statement can use arbitrary expressions in cases - - * The `switch` statement can switch over nothing (equals switching over true) - - * Cases do not fall through by default (no `break` needed), use `fallthrough` at the end of a block to fall through. - - * The `for` loop can loop over ranges: `for key, val := range map { do something }` - - - - -### Goroutines - -The keyword `go` spawns a new goroutine, a concurrently executed function. It can be used with any function call, even a function literal: - -``` -func main() { - ... - go func() { - ... - }() - - go some_function(some_argument) -} -``` - -### Channels - -Goroutines are often combined with channels to provide an extended form of Communicating Sequential Processes . A channel is a concurrent-safe queue, and can be buffered or unbuffered: - -``` -var unbuffered = make(chan int) // sending blocks until value has been read -var buffered = make(chan int, 5) // may have up to 5 unread values queued -``` - -The `<-` operator is used to communicate with a single channel. - -``` -valueReadFromChannel := <- channel -otherChannel <- valueToSend -``` - -The `select` statement allows communication with multiple channels: - -``` -select { - case incoming := <- inboundChannel: - // A new message for me - case outgoingChannel <- outgoing: - // Could send a message, yay! -} -``` - -### The `defer` statement - -Go provides a `defer` statement that allows a function call to be scheduled for execution when the function exits. It can be used for resource clean-up, for example: - -``` -func myFunc(someFile io.ReadCloser) { - defer someFile.close() - /bin /boot /dev /etc /home /lib /lib64 /lost+found /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var Do stuff with file */ -} -``` - -It is of course possible to use function literals as the function to call, and any variables can be used as usual when writing the call. - -### Error handling - -Go does not provide exceptions or structured error handling. Instead, it handles errors by returning them in a second or later return value: - -``` -func Read(p []byte) (n int, err error) - -// Built-in type: -type error interface { - Error() string -} -``` - -Errors have to be checked in the code, or can be assigned to `_`: - -``` -n0, _ := Read(Buffer) // ignore error -n, err := Read(buffer) -if err != nil { - return err -} -``` - -There are two functions to quickly unwind and recover the call stack, though: `panic()` and `recover()`. When `panic()` is called, the call stack is unwound, and any deferred functions are run as usual. When a deferred function invokes `recover()`, the unwinding stops, and the value given to `panic()` is returned. If we are unwinding normally and not due to a panic, `recover()` simply returns `nil`. In the example below, a function is deferred and any `error` value that is given to `panic()` will be recovered and stored in an error return value. Libraries sometimes use that approach to make highly recursive code like parsers more readable, while still maintaining the usual error return value for public functions. - -``` -func Function() (err error) { - defer func() { - s := recover() - switch s := s.(type) { // type switch - case error: - err = s // s has type error now - default: - panic(s) - } - } -} -``` - -### Arrays and slices - -As mentioned before, an array is a value type and a slice is a pointer into an array, created either by slicing an existing array or by using `make()` to create a slice, which will create an anonymous array to hold the elements. - -``` -slice1 := make([]int, 2, 5) // 5 elements allocated, 2 initialized to 0 -slice2 := array[:] // sliced entire array -slice3 := array[1:] // slice of array without first element -``` - -There are some more possible combinations for the slicing operator than mentioned above, but this should give a good first impression. - -A slice can be used as a dynamically growing array, using the `append()` function. - -``` -slice = append(slice, value1, value2) -slice = append(slice, arrayOrSlice...) -``` - -Slices are also used internally to represent variable parameters in variable length functions. - -### Maps - -Maps are simple key-value stores and support indexing and assigning. They are not thread-safe. - -``` -someValue := someMap[someKey] -someValue, ok := someMap[someKey] // ok is false if key not in someMap -someMap[someKey] = someValue -``` --------------------------------------------------------------------------------- - -via: https://blog.jak-linux.org/2018/12/24/introduction-to-go/ - -作者:[Julian Andres Klode][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://blog.jak-linux.org/ -[b]: https://github.com/lujun9972 From 39338d6000f1021eb987c1588ab0de8ccb9992ef Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 13:01:56 +0800 Subject: [PATCH 130/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190117=20Pyvoc?= =?UTF-8?q?=20=E2=80=93=20A=20Command=20line=20Dictionary=20And=20Vocabula?= =?UTF-8?q?ry=20Building=20Tool=20sources/tech/20190117=20Pyvoc=20-=20A=20?= =?UTF-8?q?Command=20line=20Dictionary=20And=20Vocabulary=20Building=20Too?= =?UTF-8?q?l.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Dictionary And Vocabulary Building Tool.md | 239 ++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 sources/tech/20190117 Pyvoc - A Command line Dictionary And Vocabulary Building Tool.md diff --git a/sources/tech/20190117 Pyvoc - A Command line Dictionary And Vocabulary Building Tool.md b/sources/tech/20190117 Pyvoc - A Command line Dictionary And Vocabulary Building Tool.md new file mode 100644 index 0000000000..b0aa45d618 --- /dev/null +++ b/sources/tech/20190117 Pyvoc - A Command line Dictionary And Vocabulary Building Tool.md @@ -0,0 +1,239 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Pyvoc – A Command line Dictionary And Vocabulary Building Tool) +[#]: via: (https://www.ostechnix.com/pyvoc-a-command-line-dictionary-and-vocabulary-building-tool/) +[#]: author: (SK https://www.ostechnix.com/author/sk/) + +Pyvoc – A Command line Dictionary And Vocabulary Building Tool +====== + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/pyvoc-720x340.jpg) + +Howdy! I have a good news for non-native English speakers. Now, you can improve your English vocabulary and find the meaning of English words, right from your Terminal. Say hello to **Pyvoc** , a cross-platform, open source, command line dictionary and vocabulary building tool written in **Python** programming language. Using this tool, you can brush up some English words meanings, test or improve your vocabulary skill or simply use it as a CLI dictionary on Unix-like operating systems. + +### Installing Pyvoc + +Since Pyvoc is written using Python language, you can install it using [**Pip3**][1] package manager. + +``` +$ pip3 install pyvoc +``` + +Once installed, run the following command to automatically create necessary configuration files in your $HOME directory. + +``` +$ pyvoc word +``` + +Sample output: + +``` +|Creating necessary config files +/getting api keys. please handle with care! +| + +word +Noun: single meaningful element of speech or writing +example: I don't like the word ‘unofficial’ + +Verb: express something spoken or written +example: he words his request in a particularly ironic way + +Interjection: used to express agreement or affirmation +example: Word, that's a good record, man +``` + +Done! Let us go ahead and brush the English skills. + +### Use Pyvoc as a command line Dictionary tool + +Pyvoc fetches the word meaning from **Oxford Dictionary API**. + +Let us say, you want to find the meaning of a word **‘digression’**. To do so, run: + +``` +$ pyvoc digression +``` + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/pyvoc1.png) + +See? Pyvoc not only displays the meaning of word **‘digression’** , but also an example sentence which shows how to use that word in practical. + +Let us see an another example. + +``` +$ pyvoc subterfuge +| + +subterfuge +Noun: deceit used in order to achieve one's goal +example: he had to use subterfuge and bluff on many occasions +``` + +It also shows the word classes as well. As you already know, English has four major **word classes** : + + 1. Nouns, + + 2. Verbs, + + 3. Adjectives, + + 4. Adverbs. + + + + +Take a look at the following example. + +``` +$ pyvoc welcome + / + +welcome +Noun: instance or manner of greeting someone +example: you will receive a warm welcome + +Interjection: used to greet someone in polite or friendly way +example: welcome to the Wildlife Park + +Verb: greet someone arriving in polite or friendly way +example: hotels should welcome guests in their own language + +Adjective: gladly received +example: I'm pleased to see you, lad—you're welcome +``` + +As you see in the above output, the word ‘welcome’ can be used as a verb, noun, adjective and interjection. Pyvoc has given example for each class. + +If you misspell a word, it will inform you to check the spelling of the given word. + +``` +$ pyvoc wlecome +\ +No definition found. Please check the spelling!! +``` + +Useful, isn’t it? + +### Create vocabulary groups + +A vocabulary group is nothing but a collection words added by the user. You can later revise or take quiz from these groups. 100 groups of 60 words are **reserved** for the user. + +To add a word (E.g **sporadic** ) to a group, just run: + +``` +$ pyvoc sporadic -a +- + +sporadic +Adjective: occurring at irregular intervals or only in few places +example: sporadic fighting broke out + + +writing to vocabulary group... +word added to group number 51 +``` + +As you can see, I didn’t provide any group number and pyvoc displayed the meaning of given word and automatically added that word to group number **51**. If you don’t provide the group number, Pyvoc will **incrementally add words** to groups **51-100**. + +Pyvoc also allows you to specify a group number if you want to. You can specify a group from 1-50 using **-g** option. For example, I am going to add a word to Vocabulary group 20 using the following command. + +``` +$ pyvoc discrete -a -g 20 + / + +discrete +Adjective: individually separate and distinct +example: speech sounds are produced as a continuous sound signal rather + than discrete units + +creating group Number 20... +writing to vocabulary group... +word added to group number 20 +``` + +See? The above command displays the meaning of ‘discrete’ word and adds it to the vocabulary group 20. If the group doesn’t exists, Pyvoc will create it and add the word. + +By default, Pyvoc includes three predefined vocabulary groups (101, 102, and 103). These custom groups has 800 words of each. All words in these groups are taken from **GRE** and **SAT** preparation websites. + +To view the user-generated groups, simply run: + +``` +$ pyvoc word -l + - + +word +Noun: single meaningful element of speech or writing +example: I don't like the word ‘unofficial’ + +Verb: express something spoken or written +example: he words his request in a particularly ironic way + +Interjection: used to express agreement or affirmation +example: Word, that's a good record, man + + +USER GROUPS +Group no. No. of words +20 1 + +DEFAULT GROUP +Group no. No. of words +51 1 +``` +``` + +``` + +As you see, I have created one group (20) including the default group (51). + +### Test and improve English vocabulary + +As I already said, you can use the Vocabulary groups to revise or take quiz from them. + +For instance, to revise the group no. **101** , use **-r** option like below. + +``` +$ pyvoc 101 -r +``` + +You can now revise the meaning of all words in the Vocabulary group 101 in random order. Just hit ENTER to go through next questions. Once done, hit **CTRL+C** to exit. + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/pyvoc2-1.png) + +Also, you take quiz from the existing groups to brush up your vocabulary. To do so, use **-q** option like below. + +``` +$ pyvoc 103 -q 50 +``` + +This command allows you to take quiz of 50 questions from vocabulary group 103. Choose the correct answer from the list by entering the appropriate number. You will get 1 point for every correct answer. The more you score the more your vocabulary skill will be. + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/pyvoc3.png) + +Pyvoc is in the early-development stage. I hope the developer will improve it and add more features in the days to come. + +As a non-native English speaker, I personally find it useful to test and learn new word meanings in my free time. If you’re a heavy command line user and wanted to quickly check the meaning of a word, Pyvoc is the right tool. You can also test your English Vocabulary at your free time to memorize and improve your English language skill. Give it a try. You won’t be disappointed. + +And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned! + +Cheers! + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/pyvoc-a-command-line-dictionary-and-vocabulary-building-tool/ + +作者:[SK][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/manage-python-packages-using-pip/ From d2a95ab5fd4c36aeb64d4eac8fa97631dbe862b6 Mon Sep 17 00:00:00 2001 From: darksun Date: Fri, 1 Feb 2019 13:04:07 +0800 Subject: [PATCH 131/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190115=20Compar?= =?UTF-8?q?ing=203=20open=20source=20databases:=20PostgreSQL,=20MariaDB,?= =?UTF-8?q?=20and=20SQLite=20sources/tech/20190115=20Comparing=203=20open?= =?UTF-8?q?=20source=20databases-=20PostgreSQL,=20MariaDB,=20and=20SQLite.?= =?UTF-8?q?md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...abases- PostgreSQL, MariaDB, and SQLite.md | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md diff --git a/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md b/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md new file mode 100644 index 0000000000..624b880168 --- /dev/null +++ b/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md @@ -0,0 +1,146 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Comparing 3 open source databases: PostgreSQL, MariaDB, and SQLite) +[#]: via: (https://opensource.com/article/19/1/open-source-databases) +[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta) + +Comparing 3 open source databases: PostgreSQL, MariaDB, and SQLite +====== +Find out how to choose the best open source database for your needs. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_container_block.png?itok=S8MbXEYw) + +In the world of modern enterprise technologies, open source software has firmly established itself as one of the biggest forces to reckon with. After all, some of the biggest technology developments have emerged because of the [open source movement][1]. + +It's not difficult to see why: even though Linux-based open source network standards may not be as popular as proprietary options, they are the reason smart devices from different manufacturers can communicate with each other. In addition, many argue that open source development produces applications that are superior to their proprietary counterparts. This is one reason why the chances are good that your favorite tools (whether open source or proprietary) were developed using open source databases. + +Like any other category of software, the functionality and features of open source database management systems can differ quite significantly. To put that in plainer terms, [not all open source database management systems are equal][2]. If you are choosing an open source database for your organization, it's important to choose one that is user-friendly, can grow with your organization, and offers more-than-adequate security features. + +With that in mind, we've compiled this overview of open source databases and their respective advantages and disadvantages. Sadly, we had to leave out some of the most used databases. Notably, MongoDB has recently changed its licensing model, so it is no longer truly open source. This decision probably made sense from a business perspective, since MongoDB has become the de facto solution for database hosting [with nearly 27,000 companies][3] using it, but it also means MongoDB can no longer be considered a truly open source system. + +In addition, since it acquired MySQL, Oracle has all but killed the open source nature of that project, which was arguably the go-to open source database for decades. However, this has opened space for other truly open source database solutions to challenge it. Here are three of them to consider. + +### PostgreSQL + +No list of open source databases would be complete without [PostgreSQL][4], which has long been the preferred solution for businesses of all sizes. Oracle's acquisition of MySQL might have made good business sense at the time, but the rise of cloud storage has meant that the database [has gradually fallen out of favor with developers][5]. + +Although PostgreSQL has been around for a while, the relative [decline of MySQL][6] has made it a serious contender for the title of most used open source database. Since it works very similarly to MySQL, developers who prefer open source software are converting in droves. + +#### Advantages + + * By far, PostgreSQL's most mentioned advantage is the efficiency of its central algorithm, which means it outperforms many databases that are advertised as more advanced. This is especially useful if you are working with large datasets, for which I/O processes can otherwise become a bottleneck. + + * It is also one of the most flexible open source databases around; you can write functions in a wide range of server-side languages: Python, Perl, Java, Ruby, C, and R. + + * As one of the most commonly used open source databases, PostgreSQL's community support is some of the best around. + + + + +#### Disadvantages + + * PostgreSQL's efficiency with large datasets is well known, but there are quicker tools available for smaller databases. + + * While its community support is very good, PostgreSQL's core documentation could be improved. + + * If you are used to advanced tools like parallelization and clustering, be aware that these require third-party plugins in PostgreSQL. There are plans to gradually add these features to the main release, but it will likely be a few years before they are offered as standard. + + + + +### MariaDB + +[MariaDB][7] is a truly open source distribution of MySQL (released under the [GNU GPLv2][8]). It was [created after Oracle's acquisition][9] of MySQL, when some of MySQL's core developers were concerned that Oracle would undermine its open source philosophy. + +MariaDB was developed to be as compatible with MySQL as possible while replacing several key components. It uses a storage engine, Aria, that functions as both a transactional and non-transactional engine. [Some even speculated][10] Aria would become the standard engine for MySQL in future releases, before MariaDB diverged. + +#### Advantages + + * Many users choose MariaDB over MySQL due to MariaDB's [frequent security releases][11]. While this does not necessarily mean MariaDB is more secure, it does indicate the development community takes security seriously. + + * Others say MariaDB's major advantages are that it will almost definitely remain open source and highly compatible with MySQL. This means migrating from one system to the other is extremely fast. + + * Because of this compatibility, MariaDB also plays well with many other languages that are commonly used with MySQL. This means less time is spent learning and debugging code. + + * You can [install and run][12] WordPress with MariaDB instead of MySQL for better performance and a richer feature set. WordPress is the [most popular CMS by marketshare][13]—powering nearly half the internet—and has an active open source developer community. Third-party themes and plugins work as intended when WordPress is installed with MariaDB. + + + + +#### Disadvantages + + * MariaDB is somewhat liable to bloating. Its central IDX log file, in particular, tends to become very large after protracted use, ultimately slowing performance. + + * Caching is another area where MariaDB could use work—it is not as fast as it could be, which can be frustrating. + + * Despite all the initial promises, MariaDB is no longer completely compatible with MySQL. If you are migrating from MySQL, you will have some re-coding to do. + + + + +### SQLite + +[SQLite][14] is arguably the most implemented database engine in the world, thanks to its adoption by many popular web browsers, operating systems, and mobile phones. Originally developed as a lightweight fork of MySQL, unlike many other databases it is not a client-server engine; rather, the full software is embedded into each implementation. + +This creates SQLite's major advantage: on embedded or distributed systems, each machine carries an entire implementation of the database. This can greatly speed up the performance of databases because it reduces the need for inter-system calls. + +#### Advantages + + * If you are looking to build and implement a small database, SQLite is [arguably the best way to go][15]. It is extremely small, so it can be implemented across a wide range of embedded systems without time-consuming workarounds. + + * Its small size makes the system extremely fast. While some more advanced databases use complex ways of producing efficiency savings, SQLite takes a much simpler approach: By reducing the size of your database and its associated processing software, there is simply less data to work with. + + * Its widespread adoption also means SQLite is probably the most compatible database out there. This is particularly important if you need or plan to integrate your system with smartphones: the system has been native on iOS for as long as there have been third-party apps and works flawlessly in a wide range of environments. + + + + +#### Disadvantages + + * SQLite's tiny size means it lacks some features found in larger databases. It lacks built-in data encryption, for example, something that has become standard to prevent the [most common online hacker attacks][16]. + + * While the wide adoption and publicly available code makes SQLite easy to work with, it also increases its attack surface area. This is its most commonly cited disadvantage. New critical vulnerabilities are frequently discovered in SQLite, such as the recent remote attack vector called [Magellan][17]. + + * Although SQLite's single-file approach creates speed advantages, there is no easy way to implement a multi-user environment using the system. + + + + +### Which open source database is best? + +Ultimately, your choice of open source database will depend on your business needs and particularly on the size of your system. For small databases or those with limited use, go for a lightweight solution: not only will it speed up implementation but a less-complex system means you will spend less time debugging. + +For larger systems, especially in growing businesses, invest the time to implement a more complex database like PostgreSQL. This will save you time—eventually—by removing the need to re-code your databases as your business grows. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/open-source-databases + +作者:[Sam Bocetta][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sambocetta +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/article/18/2/pivotal-moments-history-open-source +[2]: https://blog.capterra.com/free-database-software/ +[3]: https://idatalabs.com/tech/products/mongodb +[4]: https://www.postgresql.org/ +[5]: https://www.theregister.co.uk/2018/05/31/rise_of_the_open_source_data_strategies/ +[6]: https://www.itworld.com/article/2721995/big-data/signs-of-mysql-decline-on-horizon.html +[7]: https://mariadb.org/ +[8]: https://github.com/MariaDB/server/blob/10.4/COPYING +[9]: https://mariadb.com/about-us/ +[10]: http://kb.askmonty.org/en/aria-faq +[11]: https://mariadb.org/tag/security/ +[12]: https://mariadb.com/resources/blog/how-to-install-and-run-wordpress-with-mariadb/ +[13]: https://websitesetup.org/popular-cms/ +[14]: https://www.sqlite.org/index.html +[15]: https://www.sqlite.org/aff_short.html +[16]: https://hostingcanada.org/most-common-website-vulnerabilities/ +[17]: https://www.securitynewspaper.com/2018/12/18/critical-vulnerability-in-sqlite-you-should-update-now/ From e6cd033e2d4636c80eb353b5d9789d1a27c0e4f2 Mon Sep 17 00:00:00 2001 From: guevaraya Date: Fri, 1 Feb 2019 16:40:08 +0800 Subject: [PATCH 132/164] Translated By Guevaraya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完成,请确认 --- ...ntion Of RSI (Repetitive Strain Injury).md | 142 ----------------- ...ntion Of RSI (Repetitive Strain Injury).md | 145 ++++++++++++++++++ 2 files changed, 145 insertions(+), 142 deletions(-) delete mode 100644 sources/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md create mode 100644 translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md diff --git a/sources/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md b/sources/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md deleted file mode 100644 index 989f54d45a..0000000000 --- a/sources/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md +++ /dev/null @@ -1,142 +0,0 @@ -Translating By Guevaraya - -Linux/Unix App For Prevention Of RSI (Repetitive Strain Injury) -====== -![workrave-image][1] - -[A repetitive strain injury][2] (RSI) is occupational overuse syndrome, non-specific arm pain or work related upper limb disorder. RSI caused from overusing the hands to perform a repetitive task, such as typing, writing, or clicking a mouse. Unfortunately, most people do not understand what RSI is or how dangerous it can be. You can easily prevent RSI using open source software called Workrave. - - -### What are the symptoms of RSI? - -I'm quoting from this [page][3]. Do you experience: - - 1. Fatigue or lack of endurance? - 2. Weakness in the hands or forearms? - 3. Tingling, numbness, or loss of sensation? - 4. Heaviness: Do your hands feel like dead weight? - 5. Clumsiness: Do you keep dropping things? - 6. Lack of strength in your hands? Is it harder to open jars? Cut vegetables? - 7. Lack of control or coordination? - 8. Chronically cold hands? - 9. Heightened awareness? Just being slightly more aware of a body part can be a clue that something is wrong. - 10. Hypersensitivity? - 11. Frequent self-massage (subconsciously)? - 12. Sympathy pains? Do your hands hurt when someone else talks about their hand pain? - - - -### How to reduce your risk of Developing RSI - - * Take breaks, when using your computer, every 30 minutes or so. Use software such as workrave to prevent RSI. - * Regular exercise can prevent all sort of injuries including RSI. - * Use good posture. Adjust your computer desk and chair to support muscles necessary for good posture. - - - -### Workrave - -Workrave is a free open source software application intended to prevent computer users from developing RSI or myopia. The software periodically locks the screen while an animated character, "Miss Workrave," walks the user through various stretching exercises and urges them to take a coffee break. The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit. The program works under MS-Windows and Linux, UNIX-like operating systems. - -#### Install workrave - -Type the following [apt command][4]/[apt-get command][5] under a Debian / Ubuntu Linux: -`$ sudo apt-get install workrave` -Fedora Linux user should type the following dnf command: -`$ sudo dnf install workrave` -RHEL/CentOS Linux user should enable EPEL repo and install it using [yum command][6]: -``` -### [ **tested on a CentOS/RHEL 7.x and clones** ] ### -$ sudo yum install epel-release -$ sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm -$ sudo yum install workrave -``` -Arch Linux user type the following pacman command to install it: -`$ sudo pacman -S workrave` -FreeBSD user can install it using the following pkg command: -`# pkg install workrave` -OpenBSD user can install it using the following pkg_add command -``` -$ doas pkg_add workrave -``` - -#### How to configure workrave - -Workrave works as an applet which is a small application whose user interface resides within a panel. You need to add workrave to panel to control behavior and appearance of the software. - -##### Adding a New Workrave Object To Panel - - * Right-click on a vacant space on a panel to open the panel popup menu. - * Choose Add to Panel. - * The Add to Panel dialog opens.The available panel objects are listed alphabetically, with launchers at the top. Select workrave applet and click on Add button. - -![Fig.01: Adding an Object \(Workrave\) to a Panel][7] -Fig.01: Adding an Object (Workrave) to a Panel - -##### How Do I Modify Properties Of Workrave Software? - -To modify the properties of an object workrave, perform the following steps: - - * Right-click on the workrave object to open the panel object popup. - * Choose Preference. Use the Properties dialog to modify the properties as required. - -![](https://www.cyberciti.biz/media/new/tips/2009/11/linux-gnome-workwave-preferences-.png) -Fig.02: Modifying the Properties of The Workrave Software - -#### Workrave in Action - -The main window shows the time remaining until it suggests a pause. The windows can be closed and you will the time remaining on the panel itself: -![Fig.03: Time reaming counter ][8] -Fig.03: Time reaming counter - -![Fig.04: Miss Workrave - an animated character walks you through various stretching exercises][9] -Fig.04: Miss Workrave - an animated character walks you through various stretching exercises - -The break prelude window, bugging you to take a micro-pause: -![Fig.05: Time for a micro-pause remainder ][10] -Fig.05: Time for a micro-pause remainder - -![Fig.06: You can skip Micro-break ][11] -Fig.06: You can skip Micro-break - -##### References: - - 1. [Workrave project][12] home page. - 2. [pokoy][13] lightweight daemon that helps prevent RSI and other computer related stress. - 3. [A Pomodoro][14] timer for GNOME 3. - 4. [RSI][2] from the wikipedia. - - - -### about the author - -The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on [Twitter][15], [Facebook][16], [Google+][17]. - --------------------------------------------------------------------------------- - -via: https://www.cyberciti.biz/tips/repetitive-strain-injury-prevention-software.html - -作者:[Vivek Gite][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.cyberciti.biz/ -[1]:https://www.cyberciti.biz/media/new/tips/2009/11/workrave-image.jpg (workrave-image) -[2]:https://en.wikipedia.org/wiki/Repetitive_strain_injury -[3]:https://web.eecs.umich.edu/~cscott/rsi.html##symptoms -[4]:https://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/ (See Linux/Unix apt command examples for more info) -[5]:https://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html (See Linux/Unix apt-get command examples for more info) -[6]:https://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ (See Linux/Unix yum command examples for more info) -[7]:https://www.cyberciti.biz/media/new/tips/2009/11/add-workwave-to-panel.png (Adding an Object (Workrave) to a Gnome Panel) -[8]:https://www.cyberciti.biz/media/new/tips/2009/11/screenshot-workrave.png (Workrave main window shows the time remaining until it suggests a pause.) -[9]:https://www.cyberciti.biz/media/new/tips/2009/11/miss-workrave.png (Miss Workrave Sofrware character walks you through various RSI stretching exercises ) -[10]:https://www.cyberciti.biz/media/new/tips/2009/11/time-for-micro-pause.gif (Workrave RSI Software Time for a micro-pause remainder ) -[11]:https://www.cyberciti.biz/media/new/tips/2009/11/Micro-break.png (Workrave RSI Software Micro-break ) -[12]:http://www.workrave.org/ -[13]:https://github.com/ttygde/pokoy -[14]:http://gnomepomodoro.org -[15]:https://twitter.com/nixcraft -[16]:https://facebook.com/nixcraft -[17]:https://plus.google.com/+CybercitiBiz diff --git a/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md b/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md new file mode 100644 index 0000000000..d1ea0ab993 --- /dev/null +++ b/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md @@ -0,0 +1,145 @@ +如何在Linux下开发避免重复性压迫损伤 +====== +![workrave-image][1] + +[重复性压迫损伤][2] (RSI)是职业性损伤综合征, 非特异性手臂疼痛或工作引起的上肢障碍。重复性压迫损伤 (RSI) 是由于过度使用双手从事重复性任务,如打字,写和使用鼠标. 不幸的是,大部分人不了解什么是重复性压迫损伤 (RSI)以及它的危害有多大。你可以使用名叫Workrave的开源软件轻松的预防重复性压迫损伤 (RSI)。 + +### 重复性压迫损伤 (RSI)有哪些症状? + +我从[page][3]引用过来的, 看看哪些你被说中了: + + 1. 疲惫缺乏忍耐力? + 2. 手掌及上肢乏力 + 3. 疼痛麻木甚至失去知觉? + 4. 沉重:你有没有感觉手很沉? + 5. 笨拙: 你有没有感觉抓不紧东西? + 6. 你有没有感觉手上无力?很难打开罐子或切菜无力? + 7. 缺乏协调和控制? + 8. 手总是冰凉的? + 9. 健康意识有待提高?稍不注意身体就发现有毛病了。 + 10. 是否过敏? + 11. 频繁的自我按摩(潜意识的)? + 12. 共鸣的疼痛? 当别人在谈论手痛的时候,你是否也感觉到了手疼? + + + +### 如何减少开发者的重复性压迫损伤风险(RSI) + + * 使用计算机的时候每个30分钟间隔休息一下。借助软件如 workrave 预防重复性压迫损伤风险(RSI)。 + * 有规律的锻炼可以预防各种损伤,包括重复性压迫损伤 + * 使用合理的姿势。调整你的电脑桌和椅子使身体保持一个肌肉放松状态 + +### Workrave + +Workrave 是一款预防计算机用户患重复性损伤(RSI)或近视。软件会定期锁屏为一个动画: "Workrave 小姐" 引导用户做各种伸展运动并敦促其休息一下。这个软件经常提醒你暂停休息一下并限制你每天的活动。程序可以运行在 MS-Window , Linux以及类UNIX操作系统下。 + + +#### 安装 workrave + +在Debian/Ubuntu Linux系统运行以下 [apt 命令][4]/[apt-get 命令][5]: +`$ sudo apt-get install workrave` + +Fedora Linux 发行版用户运行一下dnf命令: +`$ sudo dnf install workrave` + +RHEL/CentOS Linux 用户可以启动EPEL repo并用[yum 命令][6]安装: +``` +### [ **在CentOS/RHEL 7.x 及衍生版本上测试** ] ### +$ sudo yum install epel-release +$ sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm +$ sudo yum install workrave +``` + +Arch Linux用户运行以下pacman命令来安装: +`$ sudo pacman -S workrave` + +FreeBSD 用户可用一下pkg命令安装: +`# pkg install workrave` + +OpenBSD 用户可用一下pkg_add命令安装: +``` +$ doas pkg_add workrave +``` + +#### 如何配置 workrave + +Workrave 以一个小程序运行,他的用户界面位于面板中。你可以为 workrave 增加一个面板来控制软件的动作和外观。 + +##### 增加一个新workrave对象到面板 + + * 在面板空白区域右键,打开面板弹出菜单 + * 选择新增到面板 + * 新增面板对话框打开,在加载器顶部,可以看到可用的面板对象按照字母排列。选中 workrave 程序并单击新增。 + +![Fig.01: 添加workrave对象到面板][7] +Fig.01: 新增workrave对象到面板 + +##### 如何设置 Workrave 属性? + +如果修改 workrave 对象的属性,执行以下步骤: + + * 右键 workrave 对象打开面板对象弹出 + * 选中偏好。使用属性对话框修改对应属性 + +![](https://www.cyberciti.biz/media/new/tips/2009/11/linux-gnome-workwave-preferences-.png) +Fig.02: 修改 Workrave 对象属性 + +#### Workrave 运行展示 + +主窗口显示下一次提醒休息的剩余时间,这个窗口可以关闭,时间提示窗口会在面板上。 + +![Fig.03: 时间计数器 ][8] +Fig.03:时间计数器 + +![Fig.04: Workrave 小姐- 引导你做伸展运动的动画][9] +Fig.04: Workrave 小姐- 引导你做伸展运动的动画 + +休息提示窗口,请求你暂停一下工作 + +![Fig.05: 休息提示倒计时 ][10] +Fig.05: 休息提示倒计时 + +![Fig.06: 你可以跳过休息按钮 ][11] +Fig.06: 你可以跳过休息按钮 + +##### 参考链接: + + 1. [Workrave 项目][12] 主页 + 2. [pokoy][13] 轻量级防止重复性压迫损伤(RSI)和其他计算机压力的程序 + 3. GNOME3下的[Pomodoro][14] 计数器 . + 4. [RSI][2] 的维基百科 + + + +### 关于作者 + +作者是nixCraft创始人,经验丰富的系统管理员,同时也是一个Linux/Unix系统下的shell脚本培训师。他曾服务于全球客户,并与多个行业合作包括IT,教育,国防和航天研究,以及非盈利机构。可以[Twitter][15], [Facebook][16], [Google+][17]关注他。 + +-------------------------------------------------------------------------------- + +via: https://www.cyberciti.biz/tips/repetitive-strain-injury-prevention-software.html + +作者:[Vivek Gite][a] +译者:[guevaraya](https://github.com/guevaraya) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.cyberciti.biz/ +[1]:https://www.cyberciti.biz/media/new/tips/2009/11/workrave-image.jpg +[2]:https://en.wikipedia.org/wiki/Repetitive_strain_injury +[3]:https://web.eecs.umich.edu/~cscott/rsi.html##symptoms +[4]:https://www.cyberciti.biz/faq/ubuntu-lts-debian-linux-apt-command-examples/ +[5]:https://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html +[6]:https://www.cyberciti.biz/faq/rhel-centos-fedora-linux-yum-command-howto/ +[7]:https://www.cyberciti.biz/media/new/tips/2009/11/add-workwave-to-panel.png +[8]:https://www.cyberciti.biz/media/new/tips/2009/11/screenshot-workrave.png +[9]:https://www.cyberciti.biz/media/new/tips/2009/11/miss-workrave.png +[10]:https://www.cyberciti.biz/media/new/tips/2009/11/time-for-micro-pause.gif +[11]:https://www.cyberciti.biz/media/new/tips/2009/11/Micro-break.png +[12]:http://www.workrave.org/ +[13]:https://github.com/ttygde/pokoy +[14]:http://gnomepomodoro.org +[15]:https://twitter.com/nixcraft +[16]:https://facebook.com/nixcraft +[17]:https://plus.google.com/+CybercitiBiz From 14cbe408d2dad53cef5bcbdb09993cd4a448ba63 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 1 Feb 2019 17:52:19 +0800 Subject: [PATCH 133/164] PRF:20181212 Top 5 configuration management tools.md @HankChow --- ...12 Top 5 configuration management tools.md | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/translated/tech/20181212 Top 5 configuration management tools.md b/translated/tech/20181212 Top 5 configuration management tools.md index d618833492..a62de5ffa2 100644 --- a/translated/tech/20181212 Top 5 configuration management tools.md +++ b/translated/tech/20181212 Top 5 configuration management tools.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Top 5 configuration management tools) @@ -9,7 +9,9 @@ 五大最流行的配置管理工具 ====== -在寻找合适的 DevOps 工具之前,你最好要对配置管理工具有一定的了解。 + +> 了解一下配置管理工具,以找出哪个最适合你的 DevOps 组织。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M) DevOps 正因为有提高产品质量、缩短产品开发时间等优势,目前备受业界关注,同时也在长足发展当中。 @@ -21,13 +23,11 @@ DevOps 正因为有提高产品质量、缩短产品开发时间等优势,目 * **评估**保证了及时的改进; * **分享**让 CAMS 成为一个完整的循环过程。 - - DevOps 的另一个思想是任何东西,包括服务器、数据库、网络、日志文件、应用配置、文档、自动化测试、部署流程等,都可以通过代码来管理。 -在本文中,我主要介绍配置管理的自动化。配置管理工具作为[基础架构即代码Infrastructure as Code][2](IaC)的一部分,支持使用软件进行开发实践,以及通过明文定义的文件来管理数据中心。 +在本文中,我主要介绍配置管理的自动化。配置管理工具作为[基础架构即代码Infrastructure as Code][2](IaC)的一部分,支持使用经过测试和验证的软件开发实践,通过明文定义文件管理和配置数据中心。 -DevOps 团队只需要通过操作简单的配置文件,就可以实现应用开发中包括版本控制、测试、小型部署、设计模式这些最佳实践。总而言是,配置管理工具实现了通过编写代码来使基础架构管理变得自动化。 +DevOps 团队只需要通过操作简单的配置文件,就可以实现应用开发中包括版本控制、测试、小型部署、设计模式在内的这些最佳实践。总而言之,配置管理工具实现了通过编写代码来使基础架构的配置和管理变得自动化。 ### 为什么要使用配置管理工具? @@ -37,29 +37,37 @@ DevOps 团队只需要通过操作简单的配置文件,就可以实现应用 * 让代码遵守编码规范,提高代码可读性; * 具有幂等性Idempotency,也就是说,无论执行多少次重复的配置管理操作,得到的结果都是一致的; - * 可以方便地管理分布式系统和大量的远程服务器。 + * 分布式的设计可以方便地管理大量的远程服务器。 -配置管理工具主要分为拉取pull模式和推送push模式。拉取模式是指安装在各台服务器上的代理agent定期从中央存储库central repository拉取最新的配置并应用到对应的服务器上;而推送模式则由中央服务器central server主动向其它服务器推送更新的配置。 +配置管理工具主要分为拉取pull模式和推送push模式。拉取模式是指安装在各台服务器上的代理agent定期从中央存储库central repository拉取最新的配置并应用到对应的服务器上;而推送模式则由中央服务器central server的中央服务器会触发其它受管服务器的更新。 ### 五大最流行的配置管理工具 -目前配置管理工具有很多,不同的配置管理工具都有自己最适合的使用场景。而对于下面五个我按照字母顺序列出的配置管理工具,都对 DevOps 有明显的帮助:具有开源许可证、使用外部配置文件、支持无人值守运行、可以通过脚本自定义运行。下面对它们的介绍都来源于它们的软件库和官网内容。 +目前配置管理工具有很多,不同的配置管理工具都有自己最适合的使用场景。而对于下面五个我按照字母顺序列出的配置管理工具,都对 DevOps 有明显的帮助:全都具有开源许可证、使用外部配置文件、支持无人值守运行、可以通过脚本自定义运行。下面对它们的介绍都来源于它们的软件库和官网内容。 #### Ansible “Ansible 是一个极其简洁的 IT 自动化平台,可以让你的应用和系统以更简单的方式部署。不需要安装任何代理,只需要使用 SSH 的方式和简单的语言,就可以免去脚本或代码部署应用的过程。”——[GitHub Ansible 代码库][3] -Ansible 是我最喜欢的工具之一,我在几年前就开始使用了。你可以使用 Ansible 在命令行中让多个服务器执行同一个命令,也可以使用 YAML 格式的 playbook 来让它自动执行特定的操作,这让技术团队和非技术团队之间的沟通变得更加明确。简洁、无代理、配置文件对非技术人员友好是它的几个主要优点。 +- [官网](https://www.ansible.com/) +- [文档](https://docs.ansible.com/ansible/) +- [社区](https://www.ansible.com/community) -由于 Ansible 不需要代理,因此对服务器的资源消耗会很少。在默认情况下,Ansible 使用的推送模式需要借助 SSH 连接,但 Ansible 也支持拉取模式。[playbook][4] 可以使用最少的命令集编写,当然也可以扩展为更加精细的自动化任务,包括引入其它角色、变量和模块。 +Ansible 是我最喜欢的工具之一,我在几年前就开始使用了。你可以使用 Ansible 在命令行中让多个服务器执行同一个命令,也可以使用 YAML 格式的剧本playbook来让它自动执行特定的操作,这促进了技术团队和非技术团队之间的沟通。简洁、无代理、配置文件对非技术人员友好是它的几个主要优点。 -你可以将 Ansible 和其它工具(包括 Ansible Works、Jenkins、RunDeck、[ARA][5] 等)结合起来使用,因为这些工具支持 [playbook 的回溯功能][6],这样就可以很方便地控制整个开发周期中的不同流程。 +由于 Ansible 不需要代理,因此对服务器的资源消耗会很少。Ansible 默认使用的推送模式需要借助 SSH 连接,但 Ansible 也支持拉取模式。[剧本][4] 可以使用最少的命令集编写,当然也可以扩展为更加精细的自动化任务,包括引入角色、变量和其它人写的模块。 + +你可以将 Ansible 和其它工具(包括 Ansible Works、Jenkins、RunDeck、[ARA][5] 等)结合起来使用,因为这些工具 [提供了运行剧本时的可追溯性][6],这样就可以创建控制流程的中央控制台。 ### CFEngine -“CFEngine 3 是一个流行的开源配置管理系统,它可以为大规模的系统提供自动化配置和维护。”——[GitHub CFEngine 代码库][7] +“CFEngine 3 是一个流行的开源配置管理系统,它主要用于为大规模的系统提供自动化配置和维护。”——[GitHub CFEngine 代码库][7] -CFEngine 最早在 1993 年由 Mark Burgess 以自动配置管理的科学方法提出,目的是降低计算机系统配置中的熵,最终收敛到期望的配置状态,同时还阐述了幂等性是让系统达到期望状态的能力。Burgess 在 2004 年又提出了承诺理论Promise Theory,这个理论描述了代理之间自发合作的模型。 +- [官网](https://cfengine.com/) +- [文档](https://docs.cfengine.com/docs/3.12/) +- [社区](https://cfengine.com/community/) + +CFEngine 最早在 1993 年由 Mark Burgess 作为自动配置管理的科学方法提出,目的是降低计算机系统配置中的熵,最终收敛到期望的配置状态,同时还阐述了幂等性是让系统达到期望状态的能力。Burgess 在 2004 年又提出了[承诺理论][8]Promise Theory,这个理论描述了代理之间自发合作的模型。 CFEngine 的最新版本已经用到了承诺理论,在各个服务器上的代理程序会从中央存储库拉取配置。CFEngine 的配置对专业技能要求较高,因此它比较适合技术团队使用。 @@ -67,13 +75,21 @@ CFEngine 的最新版本已经用到了承诺理论,在各个服务器上的 “为整个基础架构在配置管理上带来便利的一个系统集成框架。”——[GitHub Chef 代码库][9] -Chef 通过由 Ruby 编写的“菜谱recipe”来让你的基础架构保持在最新、最兼容的状态,这些“菜谱”描述了一系列资源的某种状态。Chef 既可以通过客户端-服务端的模式运行,也可以在 [chef-solo][10] 这种独立配置的模式下运行。大部分云提供商都很好地集成了 Chef,因此可以使用它为新机器做自动配置。 +- [官网](http://www.chef.io/chef/) +- [文档](https://docs.chef.io/) +- [社区](https://www.chef.io/community/) + +Chef 通过由 Ruby 编写的“菜谱recipe”来让你的基础架构保持在最新、最兼容的状态,这些“菜谱”描述了一系列应处于某种状态的资源。Chef 既可以通过客户端-服务端的模式运行,也可以在 [chef-solo][10] 这种独立配置的模式下运行。大部分云提供商都很好地集成了 Chef,因此可以使用它为新机器做自动配置。 Chef 有广泛的用户基础,同时也提供了完备的工具包,让不同技术背景的团队可以通过“菜谱”进行沟通。尽管如此,它仍然算是一个技术导向的工具。 ### Puppet -“Puppet 是可以在 Linux、Unix 和 Windows 系统上运行的自动化管理引擎,它可以根据集中的规范来执行诸如添加用户、安装软件包、更新服务器配置等等管理任务。”——[GitHub Puppet 代码库][11] +“Puppet 是一个可以在 Linux、Unix 和 Windows 系统上运行的自动化管理引擎,它可以根据集中的规范来执行诸如添加用户、安装软件包、更新服务器配置等等管理任务。”——[GitHub Puppet 代码库][11] + +- [官网](https://puppet.com/) +- [文档](https://puppet.com/docs) +- [社区](https://puppet.com/community) Puppet 作为一款面向运维工程师和系统管理员的工具,在更多情况下是作为配置管理工具来使用。它通过客户端-服务端的模式工作,使用代理从主服务器获取配置指令。 @@ -83,6 +99,10 @@ Puppet 使用声明式语言declarative language或 Ruby “为大规模基础结构或应用程序实现自动化管理的软件。”——[GitHub Salt 代码库][12] +- [官网](https://www.saltstack.com/) +- [文档](https://docs.saltstack.com/en/latest/contents.html) +- [社区](https://www.saltstack.com/resources/community/) + Salt 的专长就是快速收集数据,即使是上万台服务器也能够轻松完成任务。它使用 Python 模块来管理配置信息和执行特定的操作,这些模块可以让 Salt 实现所有远程操作和状态管理。但配置 Salt 模块对技术水平有一定的要求。 Salt 使用客户端-服务端的结构(Salt minions 是客户端,而 Salt master 是服务端),并以 Salt 状态文件记录需要达到的目标状态。 @@ -98,7 +118,7 @@ via: https://opensource.com/article/18/12/configuration-management-tools 作者:[Marco Bravo][a] 选题:[lujun9972][b] 译者:[HankChow](https://github.com/HankChow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1811d815a68ae9aee85008570c19017bc51aaeee Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 1 Feb 2019 17:52:55 +0800 Subject: [PATCH 134/164] PUB:20181212 Top 5 configuration management tools.md @HankChow https://linux.cn/article-10497-1.html --- .../20181212 Top 5 configuration management tools.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20181212 Top 5 configuration management tools.md (99%) diff --git a/translated/tech/20181212 Top 5 configuration management tools.md b/published/20181212 Top 5 configuration management tools.md similarity index 99% rename from translated/tech/20181212 Top 5 configuration management tools.md rename to published/20181212 Top 5 configuration management tools.md index a62de5ffa2..0f1c42cdf6 100644 --- a/translated/tech/20181212 Top 5 configuration management tools.md +++ b/published/20181212 Top 5 configuration management tools.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10497-1.html) [#]: subject: (Top 5 configuration management tools) [#]: via: (https://opensource.com/article/18/12/configuration-management-tools) [#]: author: (Marco Bravo https://opensource.com/users/marcobravo) From 303f44432bcc62e14f5d37887f6983628199f53c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 1 Feb 2019 19:32:29 +0800 Subject: [PATCH 135/164] PRF:20190123 Commands to help you monitor activity on your Linux server.md @dianbanjiu --- ...u monitor activity on your Linux server.md | 108 +++++++++--------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md b/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md index 394b553d13..29b964b35f 100644 --- a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md +++ b/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md @@ -1,16 +1,16 @@ [#]: collector: (lujun9972) -[#]: translator: (dianbanjiu ) -[#]: reviewer: ( ) +[#]: translator: (dianbanjiu) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Commands to help you monitor activity on your Linux server) [#]: via: (https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) -监控 Linux 服务器的几个常用命令 +监控 Linux 服务器活动的几个命令 ====== -watch、top 和 ac 命令为我们监视 Linux 服务器上的活动提供了一些十分高效的途径。 +> `watch`、`top` 和 `ac` 命令为我们监视 Linux 服务器上的活动提供了一些十分高效的途径。 ![](https://images.idgesg.net/images/article/2019/01/owl-face-100785829-large.jpg) @@ -18,40 +18,40 @@ watch、top 和 ac 命令为我们监视 Linux 服务器上的活动提供了一 ### watch 命令 -**watch** 是一个使得重复检测 Linux 系统中一系列数据,例如用户活动、正在运行进程、登录、内存使用等更加容易的命令。这个命令实际上是重复地运行一个特定的命令,每次都会重写之前显示的输出,它提供了一个比较方便的方式用以监测在你的系统中发生的活动。 +`watch` 是一个用来轻松地重复检测 Linux 系统中一系列数据命令,例如用户活动、正在运行进程、登录、内存使用等。这个命令实际上是重复地运行一个特定的命令,每次都会重写之前显示的输出,它提供了一个比较方便的方式用以监测在你的系统中发生的活动。 -首先以一个基础且不是特别有用的命令开始,你可以运行 `watch -n 5 date`,然后你可以看到在终端中显示了当前的日期和时间,这些数据会每五秒更新一次。你可能已经猜到了,**-n 5** 选项指定了运行接下来一次命令需要等待的秒数。默认是 2 秒。这个命令将会一直运行并按照指定的时间更新显示,直到你使用 ^C 停下它。 +首先以一个基础且不是特别有用的命令开始,你可以运行 `watch -n 5 date`,然后你可以看到在终端中显示了当前的日期和时间,这些数据会每五秒更新一次。你可能已经猜到了,`-n 5` 选项指定了运行接下来一次命令需要等待的秒数。默认是 2 秒。这个命令将会一直运行并按照指定的时间更新显示,直到你使用 `^C` 停下它。 ``` -Every 5.0s: date butterfly: Wed Jan 23 15:59:14 2019 +Every 5.0s: date butterfly: Wed Jan 23 15:59:14 2019 Wed Jan 23 15:59:14 EST 2019 ``` -下面是一个很有趣的命令实例,你可以监控一个在服务器中登录用户的列表,该列表会按照指定的时间定时更新。就像下面写到的,这个命令会每 10 秒更新一次这个列表。登出的用户将会从当前显示的列表中消失,那些新登录的将会被添加到这个表格当中。如果没有用户再登录或者登出,这个表格跟之前显示的将不会有任何不同。 +下面是一个更有趣的命令实例,你可以监控一个在服务器中登录用户的列表,该列表会按照指定的时间定时更新。就像下面写到的,这个命令会每 10 秒更新一次这个列表。登出的用户将会从当前显示的列表中消失,那些新登录的将会被添加到这个表格当中。如果没有用户再登录或者登出,这个表格跟之前显示的将不会有任何不同。 ``` $ watch -n 10 who -Every 10.0s: who butterfly: Tue Jan 23 16:02:03 2019 +Every 10.0s: who butterfly: Tue Jan 23 16:02:03 2019 -shs :0 2019-01-23 09:45 (:0) -dory pts/0 2019-01-23 15:50 (192.168.0.5) -nemo pts/1 2019-01-23 16:01 (192.168.0.15) -shark pts/3 2019-01-23 11:11 (192.168.0.27) +shs :0 2019-01-23 09:45 (:0) +dory pts/0 2019-01-23 15:50 (192.168.0.5) +nemo pts/1 2019-01-23 16:01 (192.168.0.15) +shark pts/3 2019-01-23 11:11 (192.168.0.27) ``` -如果你只是想看有多少用户登录过,可以通过 watch 调用 **uptime** 命令获取用户数和负载的平均水平,以及系统的工作状况。 +如果你只是想看有多少用户登录进来,可以通过 `watch` 调用 `uptime` 命令获取用户数和负载的平均水平,以及系统的工作状况。 ``` $ watch uptime -Every 2.0s: uptime butterfly: Tue Jan 23 16:25:48 2019 +Every 2.0s: uptime butterfly: Tue Jan 23 16:25:48 2019 - 16:25:48 up 22 days, 4:38, 3 users, load average: 1.15, 0.89, 1.02 + 16:25:48 up 22 days, 4:38, 3 users, load average: 1.15, 0.89, 1.02 ``` -如果你想使用 watch 重复一个包含了管道的命令,就需要将该命令用引号括起来,就比如下面这个每五秒显示一次有多少进程正在运行的命令。 +如果你想使用 `watch` 重复一个包含了管道的命令,就需要将该命令用引号括起来,就比如下面这个每五秒显示一次有多少进程正在运行的命令。 ``` $ watch -n 5 'ps -ef | wc -l' @@ -68,77 +68,77 @@ $ watch -n 5 free -m Every 5.0s: free -m butterfly: Tue Jan 23 16:34:09 2019 - total used free shared buff/cache available -Mem: 5959 776 3276 12 1906 4878 -Swap: 2047 0 2047 +Every 5.0s: free -m butterfly: Tue Jan 23 16:34:09 2019 + + total used free shared buff/cache available +Mem: 5959 776 3276 12 1906 4878 +Swap: 2047 0 2047 ``` -你可以在 **watch** 后添加一些选项查看某个特定用户下运行的进程,不过 **top** 为此提供了更好的选择。 +你可以在 `watch` 后添加一些选项查看某个特定用户下运行的进程,不过 `top` 为此提供了更好的选择。 ### top 命令 -如果你想查看某个特定用户下的进程,top 命令的 `-u` 选项可以很轻松地帮你达到这个目的。 +如果你想查看某个特定用户下的进程,`top` 命令的 `-u` 选项可以很轻松地帮你达到这个目的。 ``` $ top -u nemo -top - 16:14:33 up 2 days, 4:27, 3 users, load average: 0.00, 0.01, 0.02 -Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie -%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st -MiB Mem : 5959.4 total, 3277.3 free, 776.4 used, 1905.8 buff/cache -MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 4878.4 avail Mem +top - 16:14:33 up 2 days, 4:27, 3 users, load average: 0.00, 0.01, 0.02 +Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie +%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st +MiB Mem : 5959.4 total, 3277.3 free, 776.4 used, 1905.8 buff/cache +MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 4878.4 avail Mem - PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND -23026 nemo 20 0 46340 7820 6504 S 0.0 0.1 0:00.05 systemd -23033 nemo 20 0 149660 3140 72 S 0.0 0.1 0:00.00 (sd-pam) -23125 nemo 20 0 63396 5100 4092 S 0.0 0.1 0:00.00 sshd -23128 nemo 20 0 16836 5636 4284 S 0.0 0.1 0:00.03 zsh + PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND +23026 nemo 20 0 46340 7820 6504 S 0.0 0.1 0:00.05 systemd +23033 nemo 20 0 149660 3140 72 S 0.0 0.1 0:00.00 (sd-pam) +23125 nemo 20 0 63396 5100 4092 S 0.0 0.1 0:00.00 sshd +23128 nemo 20 0 16836 5636 4284 S 0.0 0.1 0:00.03 zsh ``` 你可能不仅可以看到某个用户下的进程,还可以查看每个进程所占用的资源,以及系统总的工作状况。 ### ac 命令 -如果你想查看系统中每个用户登录的时长,可以使用 **ac** 命令。运行该命令之前首先需要安装 **acct**(Debian 等) 或者 **psacct**(RHEL、Centos 等) 包。 +如果你想查看系统中每个用户登录的时长,可以使用 `ac` 命令。运行该命令之前首先需要安装 `acct`(Debian 等)或者 `psacct`(RHEL、Centos 等)包。 -**ac** 命令有一系列的选项,该命令从 **wtmp** 文件中拉取数据。这个例子展示的是最近用户登录的总小时数。 +`ac` 命令有一系列的选项,该命令从 `wtmp` 文件中拉取数据。这个例子展示的是最近用户登录的总小时数。 ``` $ ac - total 1261.72 + total 1261.72 ``` 这个命令显示了用户登录的总的小时数: ``` $ ac -p - shark 5.24 - nemo 5.52 - shs 1251.00 - total 1261.76 + shark 5.24 + nemo 5.52 + shs 1251.00 + total 1261.76 ``` -这个命令显示了用户每天登录的小时数: +这个命令显示了每天登录的用户小时数: ``` $ ac -d | tail -10 -Jan 11 total 0.05 -Jan 12 total 1.36 -Jan 13 total 16.39 -Jan 15 total 55.33 -Jan 16 total 38.02 -Jan 17 total 28.51 -Jan 19 total 48.66 -Jan 20 total 1.37 -Jan 22 total 23.48 -Today total 9.83 +Jan 11 total 0.05 +Jan 12 total 1.36 +Jan 13 total 16.39 +Jan 15 total 55.33 +Jan 16 total 38.02 +Jan 17 total 28.51 +Jan 19 total 48.66 +Jan 20 total 1.37 +Jan 22 total 23.48 +Today total 9.83 ``` ### 总结 -Linux 系统上有很多命令可以用于检查系统活动。**watch** 命令允许你以重复的方式运行任何命令,并观察输出有何变化。**top** 命令是一个专注于用户进程的最佳选项,以及允许你以动态方式查看进程的变化,还可以使用 **ac** 命令检查用户连接到系统的时间。 - -加入 [Facebook][1] 和 [LinkedIn][2] 上的 Network World 社区,来交流更多有用的主题。 +Linux 系统上有很多命令可以用于检查系统活动。`watch` 命令允许你以重复的方式运行任何命令,并观察输出有何变化。`top` 命令是一个专注于用户进程的最佳选项,以及允许你以动态方式查看进程的变化,还可以使用 `ac` 命令检查用户连接到系统的时间。 -------------------------------------------------------------------------------- @@ -147,7 +147,7 @@ via: https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity- 作者:[Sandra Henry-Stocker][a] 选题:[lujun9972][b] 译者:[dianbanjiu](https://github.com/dianbanjiu) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ce70cf485271aba07ade61f61f080763cf0fba74 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 1 Feb 2019 19:33:03 +0800 Subject: [PATCH 136/164] PUB:20190123 Commands to help you monitor activity on your Linux server.md @dianbanjiu https://linux.cn/article-10498-1.html --- ...mands to help you monitor activity on your Linux server.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190123 Commands to help you monitor activity on your Linux server.md (98%) diff --git a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md b/published/20190123 Commands to help you monitor activity on your Linux server.md similarity index 98% rename from translated/tech/20190123 Commands to help you monitor activity on your Linux server.md rename to published/20190123 Commands to help you monitor activity on your Linux server.md index 29b964b35f..4900629eaf 100644 --- a/translated/tech/20190123 Commands to help you monitor activity on your Linux server.md +++ b/published/20190123 Commands to help you monitor activity on your Linux server.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (dianbanjiu) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10498-1.html) [#]: subject: (Commands to help you monitor activity on your Linux server) [#]: via: (https://www.networkworld.com/article/3335200/linux/how-to-monitor-activity-on-your-linux-server.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) From 7265d7635cb76672877b526ba1decd92e7e11bf8 Mon Sep 17 00:00:00 2001 From: dianbanjiu Date: Fri, 1 Feb 2019 21:39:27 +0800 Subject: [PATCH 137/164] translating --- ...8 Using more to view text files at the Linux command line.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190128 Using more to view text files at the Linux command line.md b/sources/tech/20190128 Using more to view text files at the Linux command line.md index 872df3eba8..bc7c9a3c8d 100644 --- a/sources/tech/20190128 Using more to view text files at the Linux command line.md +++ b/sources/tech/20190128 Using more to view text files at the Linux command line.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: ( dianbanjiu ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 722a87b09e76bdf25cd051311e12f7bf818c5d4b Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 1 Feb 2019 22:43:03 +0800 Subject: [PATCH 138/164] PRF:20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md @guevaraya --- ...ntion Of RSI (Repetitive Strain Injury).md | 110 ++++++++++-------- 1 file changed, 62 insertions(+), 48 deletions(-) diff --git a/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md b/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md index d1ea0ab993..80980b29bb 100644 --- a/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md +++ b/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md @@ -1,12 +1,13 @@ -如何在Linux下开发避免重复性压迫损伤 +Linux 下如何避免重复性压迫损伤(RSI) ====== + ![workrave-image][1] -[重复性压迫损伤][2] (RSI)是职业性损伤综合征, 非特异性手臂疼痛或工作引起的上肢障碍。重复性压迫损伤 (RSI) 是由于过度使用双手从事重复性任务,如打字,写和使用鼠标. 不幸的是,大部分人不了解什么是重复性压迫损伤 (RSI)以及它的危害有多大。你可以使用名叫Workrave的开源软件轻松的预防重复性压迫损伤 (RSI)。 +[重复性压迫损伤][2]Repetitive Strain Injury(RSI)是职业性损伤综合症,非特异性手臂疼痛或工作引起的上肢障碍。RSI 是由于过度使用双手从事重复性任务导致的,如打字、书写和使用鼠标. 不幸的是,大部分人不了解什么是 RSI 以及它的危害有多大。你可以使用名叫 Workrave 的开源软件轻松的预防 RSI。 -### 重复性压迫损伤 (RSI)有哪些症状? +### RSI 有哪些症状? -我从[page][3]引用过来的, 看看哪些你被说中了: +我从这个[页面][3]引用过来的,看看哪些你被说中了: 1. 疲惫缺乏忍耐力? 2. 手掌及上肢乏力 @@ -18,31 +19,35 @@ 8. 手总是冰凉的? 9. 健康意识有待提高?稍不注意身体就发现有毛病了。 10. 是否过敏? - 11. 频繁的自我按摩(潜意识的)? - 12. 共鸣的疼痛? 当别人在谈论手痛的时候,你是否也感觉到了手疼? + 11. 频繁的自我按摩(潜意识的)? + 12. 共鸣的疼痛?当别人在谈论手痛的时候,你是否也感觉到了手疼? +### 如何减少发展为 RSI 的风险 - -### 如何减少开发者的重复性压迫损伤风险(RSI) - - * 使用计算机的时候每个30分钟间隔休息一下。借助软件如 workrave 预防重复性压迫损伤风险(RSI)。 - * 有规律的锻炼可以预防各种损伤,包括重复性压迫损伤 - * 使用合理的姿势。调整你的电脑桌和椅子使身体保持一个肌肉放松状态 + * 使用计算机的时候每隔 30 分钟间隔休息一下。借助软件如 workrave 预防 RSI。 + * 有规律的锻炼可以预防各种损伤,包括 RSI。 + * 使用合理的姿势。调整你的电脑桌和椅子使身体保持一个肌肉放松状态。 ### Workrave -Workrave 是一款预防计算机用户患重复性损伤(RSI)或近视。软件会定期锁屏为一个动画: "Workrave 小姐" 引导用户做各种伸展运动并敦促其休息一下。这个软件经常提醒你暂停休息一下并限制你每天的活动。程序可以运行在 MS-Window , Linux以及类UNIX操作系统下。 - +Workrave 是一款预防计算机用户发展为 RSI 或近视的自由开源软件。软件会定期锁屏为一个动画: “Workrave 小姐”,引导用户做各种伸展运动并敦促其休息一下。这个软件经常提醒你暂停休息一下,并限制你每天的限度。程序可以运行在 MS-Window、Linux 以及类 UNIX 操作系统下。 #### 安装 workrave -在Debian/Ubuntu Linux系统运行以下 [apt 命令][4]/[apt-get 命令][5]: -`$ sudo apt-get install workrave` +在 Debian/Ubuntu Linux 系统运行以下 [apt 命令][4]/[apt-get 命令][5]: -Fedora Linux 发行版用户运行一下dnf命令: -`$ sudo dnf install workrave` +``` +$ sudo apt-get install workrave +``` + +Fedora Linux 发行版用户运行以下 dnf 命令: + +``` +$ sudo dnf install workrave +``` + +RHEL/CentOS Linux 用户可以启动 EPEL 仓库并用 [yum 命令][6]安装: -RHEL/CentOS Linux 用户可以启动EPEL repo并用[yum 命令][6]安装: ``` ### [ **在CentOS/RHEL 7.x 及衍生版本上测试** ] ### $ sudo yum install epel-release @@ -50,70 +55,79 @@ $ sudo yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm $ sudo yum install workrave ``` -Arch Linux用户运行以下pacman命令来安装: -`$ sudo pacman -S workrave` +Arch Linux 用户运行以下 pacman 命令来安装: -FreeBSD 用户可用一下pkg命令安装: -`# pkg install workrave` +``` +$ sudo pacman -S workrave +``` + +FreeBSD 用户可用以下 pkg 命令安装: + +``` +# pkg install workrave +``` + +OpenBSD 用户可用以下 pkg_add 命令安装: -OpenBSD 用户可用一下pkg_add命令安装: ``` $ doas pkg_add workrave ``` #### 如何配置 workrave -Workrave 以一个小程序运行,他的用户界面位于面板中。你可以为 workrave 增加一个面板来控制软件的动作和外观。 +Workrave 以一个小程序运行,它的用户界面位于面板中。你可以为 workrave 增加一个面板来控制软件的动作和外观。 -##### 增加一个新workrave对象到面板 +增加一个新 workrave 对象到面板: * 在面板空白区域右键,打开面板弹出菜单 * 选择新增到面板 * 新增面板对话框打开,在加载器顶部,可以看到可用的面板对象按照字母排列。选中 workrave 程序并单击新增。 -![Fig.01: 添加workrave对象到面板][7] -Fig.01: 新增workrave对象到面板 +![图 01:新增 workrave 对象到面板][7] -##### 如何设置 Workrave 属性? +*图 01:新增 workrave 对象到面板* 如果修改 workrave 对象的属性,执行以下步骤: * 右键 workrave 对象打开面板对象弹出 * 选中偏好。使用属性对话框修改对应属性 -![](https://www.cyberciti.biz/media/new/tips/2009/11/linux-gnome-workwave-preferences-.png) -Fig.02: 修改 Workrave 对象属性 +![图 02:修改 Workrave 对象属性](https://www.cyberciti.biz/media/new/tips/2009/11/linux-gnome-workwave-preferences-.png) + +*图 02:修改 Workrave 对象属性* #### Workrave 运行展示 -主窗口显示下一次提醒休息的剩余时间,这个窗口可以关闭,时间提示窗口会在面板上。 +主窗口显示下一次提醒休息的剩余时间,这个窗口可以关闭,时间提示窗口会显示在面板上。 -![Fig.03: 时间计数器 ][8] -Fig.03:时间计数器 +![图 03:时间计数器][8] -![Fig.04: Workrave 小姐- 引导你做伸展运动的动画][9] -Fig.04: Workrave 小姐- 引导你做伸展运动的动画 +*图 03:时间计数器* -休息提示窗口,请求你暂停一下工作 +![图 04:Workrave 小姐 - 引导你做伸展运动的动画][9] -![Fig.05: 休息提示倒计时 ][10] -Fig.05: 休息提示倒计时 +*图 04:Workrave 小姐 - 引导你做伸展运动的动画* -![Fig.06: 你可以跳过休息按钮 ][11] -Fig.06: 你可以跳过休息按钮 +休息提示窗口,请求你暂停一下工作: -##### 参考链接: +![图 05:休息提示倒计时][10] + +*图 05:休息提示倒计时* + +![图 06:你可以跳过休息][11] + +*图 06:你可以跳过休息* + +#### 参考链接: 1. [Workrave 项目][12] 主页 - 2. [pokoy][13] 轻量级防止重复性压迫损伤(RSI)和其他计算机压力的程序 - 3. GNOME3下的[Pomodoro][14] 计数器 . + 2. [pokoy][13] 防止 RSI 和其他计算机压力的轻量级守护进程 + 3. GNOME3 下的 [Pomodoro][14] 计数器 4. [RSI][2] 的维基百科 - - ### 关于作者 -作者是nixCraft创始人,经验丰富的系统管理员,同时也是一个Linux/Unix系统下的shell脚本培训师。他曾服务于全球客户,并与多个行业合作包括IT,教育,国防和航天研究,以及非盈利机构。可以[Twitter][15], [Facebook][16], [Google+][17]关注他。 +作者是 nixCraft 创始人,经验丰富的系统管理员,同时也是一个 Linux/Unix 系统下的 shell 脚本培训师。他曾服务于全球客户,并与多个行业合作包括 IT、教育、国防和航天研究,以及非盈利机构。可以在 [Twitter][15]、[Facebook][16]、[Google+][17] 上关注他。 -------------------------------------------------------------------------------- @@ -121,7 +135,7 @@ via: https://www.cyberciti.biz/tips/repetitive-strain-injury-prevention-software 作者:[Vivek Gite][a] 译者:[guevaraya](https://github.com/guevaraya) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1c89dd664285ba111742e957c45191877b204767 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 1 Feb 2019 22:45:36 +0800 Subject: [PATCH 139/164] PUB:20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md @guevaraya https://linux.cn/article-10499-1.html --- ...x-Unix App For Prevention Of RSI (Repetitive Strain Injury).md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md (100%) diff --git a/translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md b/published/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md similarity index 100% rename from translated/tech/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md rename to published/20091104 Linux-Unix App For Prevention Of RSI (Repetitive Strain Injury).md From fa39285e32438e95bda317b71280c396460025c5 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Fri, 1 Feb 2019 17:00:22 +0000 Subject: [PATCH 140/164] Revert "Start translating 'managing digital files'" This reverts commit af614d9555cb3f5f8b36e010036ae62fe05494e1. --- ...ing Digital Files (e.g., Photographs) in Files and Folders.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md b/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md index 9a5c691e42..d1fd01ef0c 100644 --- a/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md +++ b/sources/tech/20140510 Managing Digital Files (e.g., Photographs) in Files and Folders.md @@ -1,4 +1,3 @@ -Moelf translating Managing Digital Files (e.g., Photographs) in Files and Folders ====== Update 2014-05-14: added real world example From a9b4380dfb3b2339dad12499b0e83e1cefd25fa4 Mon Sep 17 00:00:00 2001 From: lctt-bot Date: Fri, 1 Feb 2019 17:00:36 +0000 Subject: [PATCH 141/164] =?UTF-8?q?Revert=20"fuowang=20=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E4=B8=AD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7ea9c4c23734b343f5ad5533863989373cefe7c0. --- ...402 An introduction to the Flask Python web app framework.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20180402 An introduction to the Flask Python web app framework.md b/sources/tech/20180402 An introduction to the Flask Python web app framework.md index ffb6e9c441..4b07338bc5 100644 --- a/sources/tech/20180402 An introduction to the Flask Python web app framework.md +++ b/sources/tech/20180402 An introduction to the Flask Python web app framework.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (fuowang) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: subject: (An introduction to the Flask Python web app framework) From c4da0579be89af1c32992b14fb7e044107c8ce4f Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Sat, 2 Feb 2019 02:07:50 +0800 Subject: [PATCH 142/164] hankchow translated --- ...90129 More About Angle Brackets in Bash.md | 88 ------------------- ...90129 More About Angle Brackets in Bash.md | 87 ++++++++++++++++++ 2 files changed, 87 insertions(+), 88 deletions(-) delete mode 100644 sources/tech/20190129 More About Angle Brackets in Bash.md create mode 100644 translated/tech/20190129 More About Angle Brackets in Bash.md diff --git a/sources/tech/20190129 More About Angle Brackets in Bash.md b/sources/tech/20190129 More About Angle Brackets in Bash.md deleted file mode 100644 index 5632fe6321..0000000000 --- a/sources/tech/20190129 More About Angle Brackets in Bash.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (HankChow) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (More About Angle Brackets in Bash) -[#]: via: (https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash) -[#]: author: (Paul Brown https://www.linux.com/users/bro66) - -More About Angle Brackets in Bash -====== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/bash-angles.png?itok=mVFnxPzF) - -In the previous article, we [introduced the subject of angle brackets][1] (`< >`) and demonstrated some of their uses. Here, we'll look at the topic from a few more angles. Let's dive right in. - -You can use `<` to trick a tool into believing the output of a command is data from a file. - -Let's say you are not sure your backup is complete, and you want to check that a certain directory contains all the files copied over from the original. You can try this: - -``` -diff <(ls /original/dir/) <(ls /backup/dir/) -``` - -[`diff`][2] is a tool that typically compares two text files line by line, looking for differences. Here it gets the output from two `ls` commands and treats them as if coming from a file and compares them as such. - -Note that there is no space between the `<` and the `(...)`. - -Running that on the original and backup of a directory where I save pretty pictures, I get: - -``` -diff <(ls /My/Pictures/) <(ls /My/backup/Pictures/) 5d4 < Dv7bIIeUUAAD1Fc.jpg:large.jpg -``` - -The `<` in the output is telling me that there is file ( _Dv7bIIeUUAAD1Fc.jpg:large.jpg_ ) on the left side of the comparison (in _/My/Pictures_ ) that is not on the right side of the comparison (in _/My/backup/Pictures_ ), which means copying over has failed for some reason. If `diff` didn't cough up any output, it would mean that the list of files were the same. - -So, you may be wondering, if you can take the output of a command or command line, make it look like the contents of a file, and feed it to an instruction that is expecting a file, that means that in the _sorting by favorite actor_ example from above, you could've done away with the intermediate file and just piped the output from the loop into `sort`. - -In short, yep! The line: - -``` -sort -r <(while read -r name surname films;do echo $films $name $surname ; done < CBactors) -``` - -does the trick nicely. - -### Here string! Good string! - -There is one more case for redirecting data using angle brackets (or arrows, or whatever you want to call them). - -You may be familiar with the practice of passing variables to commands using `echo` and a pipe (`|`). Say you want to convert a variable containing a string to uppercase characters because... I don't know... YOU LIKE SHOUTING A LOT. You could do this: - -``` -myvar="Hello World" echo $myvar | tr '[:lower:]' '[:upper:]' HELLO WORLD -``` - -The [`tr`][3] command _tr_ anslates strings to different formats. In the example above, you are telling `tr` to change all the lowercase characters that come along in the string to uppercase characters. - -It is important to know that you are not passing on the variable, but only its contents, that is, the string " _Hello World_ ". This is called the _here string_ , as in " _it is here, in this context, that we know what string we are dealing with_ ". But there is shorter, clearer, and all round better way of delivering _here strings_ to commands. Using - -``` -tr '[:lower:]' '[:upper:]' <<< $myvar -``` - -does the same thing with no need to use echo or a pipe. It also uses angle brackets, which is the whole obsessive point of this article. - -### Conclusion - -Again, Bash proves to give you lots of options with very little. I mean, who would've thunk that you could do so much with two simple characters like `<` and `>`? - -The thing is we aren't done. There are plenty of more characters that bring meaning to chains of Bash instructions. Without some background, they can make shell commands look like gibberish. Hopefully, post by post, we can help you decipher them. Until next time! - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash - -作者:[Paul Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/bro66 -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash -[2]: https://linux.die.net/man/1/diff -[3]: https://linux.die.net/man/1/tr diff --git a/translated/tech/20190129 More About Angle Brackets in Bash.md b/translated/tech/20190129 More About Angle Brackets in Bash.md new file mode 100644 index 0000000000..de4f8331ca --- /dev/null +++ b/translated/tech/20190129 More About Angle Brackets in Bash.md @@ -0,0 +1,87 @@ +[#]: collector: (lujun9972) +[#]: translator: (HankChow) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (More About Angle Brackets in Bash) +[#]: via: (https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash) +[#]: author: (Paul Brown https://www.linux.com/users/bro66) + +Bash 中尖括号的更多用法 +====== + +![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/bash-angles.png?itok=mVFnxPzF) + +在[上一篇文章][1]当中,我们介绍了尖括号(`<>`)以及它们的一些用法。在这篇文章,我们继续来深入探讨尖括号的更多其它用法。 + +通过使用 `<`,可以实现“欺骗”的效果,让其它命令认为某个命令的输出是一个文件。 + +例如,在进行备份文件的时候不确定备份是否完整,就需要去确认某个目录是否已经包含从原目录中复制过去的所有文件。你可以试一下这样操作: + +``` +diff <(ls /original/dir/) <(ls /backup/dir/) +``` + +[`diff`][2] 命令是一个逐行比较两个文件之间差异的工具。在上面的例子中,就使用了 `<` 让 `diff` 认为两个 `ls` 命令输出的结果都是文件,从而能够比较它们之间的差异。 + +要注意,在 `<` 和 `(...)` 之间是没有空格的。 + +我尝试在我的图片目录和它的备份目录执行上面的命令,输出的是以下结果: + +``` +diff <(ls /My/Pictures/) <(ls /My/backup/Pictures/) 5d4 < Dv7bIIeUUAAD1Fc.jpg:large.jpg +``` + +输出结果中的 `<` 表示 `Dv7bIIeUUAAD1Fc.jpg:large.jpg` 这个文件存在于左边的目录(`/My/Pictures`)但不存在于右边的目录(`/My/backup/Pictures`)中。也就是说,在备份过程中可能发生了问题,导致这个文件没有被成功备份。如果 `diff` 没有显示出任何输出结果,就表明两个目录中的文件是一致的。 + +看到这里你可能会想到,既然可以通过 `<` 将一些命令行的输出内容作为一个文件,提供给一个需要接受文件格式的命令,那么在上一篇文章的“最喜欢的演员排序”例子中,就可以省去中间的一些步骤,直接对输出内容执行 `sort` 操作了。 + +确实如此,这个例子可以简化成这样: + +``` +sort -r <(while read -r name surname films;do echo $films $name $surname ; done < CBactors) +``` + +### Here string + +除此以外,尖括号的重定向功能还有另一种使用方式。 + +使用 `echo` 和管道(`|`)来传递变量的用法,相信大家都不陌生。假如想要把一个字符串变量转换为全大写形式,你可以这样做: + +``` +myvar="Hello World" echo $myvar | tr '[:lower:]' '[:upper:]' HELLO WORLD +``` + +[`tr`][3] 命令可以将一个字符串转换为某种格式。在上面的例子中,就使用了 `tr` 将字符串中的所有小写字母都转换为大写字母。 + +要理解的是,这个传递过程的重点不是变量,而是变量的值,也就是字符串 `Hello World`。这样的字符串叫做 here string,含义是“这就是我们要处理的字符串”。但对于上面的例子,还可以用更直观的方式的处理,就像下面这样: + +``` +tr '[:lower:]' '[:upper:]' <<< $myvar +``` + +这种简便方式并不需要使用到 `echo` 或者管道,而是使用了我们一直在说的尖括号。 + +### 总结 + +使用 `<` 和 `>` 这两个简单的符号,原来可以实现这么多功能,Bash 又一次为工作的灵活性提供了很多选择。 + +当然,我们的介绍还远远没有完结,因为还有很多别的符号可以为 Bash 命令带来更多便利。不过如果没有充分理解它们,充满符号的 Bash 命令看起来只会像是一堆乱码。接下来我会解读更多类似的 Bash 符号,下次见! + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash + +作者:[Paul Brown][a] +选题:[lujun9972][b] +译者:[HankChow](https://github.com/HankChow) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linux.com/users/bro66 +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash +[2]: https://linux.die.net/man/1/diff +[3]: https://linux.die.net/man/1/tr + From 739198bf97c7ff27c7d04c4a71f1475a2edc114e Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Sat, 2 Feb 2019 04:35:09 +0800 Subject: [PATCH 143/164] hankchow translating --- ... 3 open source databases- PostgreSQL, MariaDB, and SQLite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md b/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md index 624b880168..f096fdd264 100644 --- a/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md +++ b/sources/tech/20190115 Comparing 3 open source databases- PostgreSQL, MariaDB, and SQLite.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (HankChow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 644bff1c51ea4414b12e9d4e9f7a42fa1c159c7c Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 2 Feb 2019 10:49:20 +0800 Subject: [PATCH 144/164] translated --- ...rminal program for tablets and desktops.md | 55 ------------------- ...rminal program for tablets and desktops.md | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md create mode 100644 translated/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md diff --git a/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md b/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md deleted file mode 100644 index 78f31a6b94..0000000000 --- a/sources/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops) -[#]: via: (https://opensource.com/article/19/1/productivity-tool-edex-ui) -[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) - -Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops -====== -Make work more fun with eDEX-UI, the 15th in our series on open source tools that will make you more productive in 2019. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx) - -There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. - -Here's the 15th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. - -### eDEX-UI - -I was 11 years old when [Tron][1] was in movie theaters. I cannot deny that, despite the fantastical nature of the film, it had an impact on my career choice later in life. - -![](https://opensource.com/sites/default/files/uploads/edex-ui-1.png) - -[eDEX-UI][2] is a cross-platform terminal program designed for tablets and desktops that was inspired by the user interface in Tron. It has five terminals in a tabbed interface, so it is easy to switch between tasks, as well as useful displays of system information. - -At launch, eDEX-UI goes through a boot sequence with information about the ElectronJS system it is based on. After the boot, eDEX-UI shows system information, a file browser, a keyboard (for tablets), and the main terminal tab. The other four tabs (labeled EMPTY) don't have anything loaded and will start a shell when you click on one. The default shell in eDEX-UI is Bash (if you are on Windows, you will likely have to change it to either PowerShell or cmd.exe). - -![](https://opensource.com/sites/default/files/uploads/edex-ui-2.png) - -Changing directories in the file browser will change directories in the active terminal and vice-versa. The file browser does everything you'd expect, including opening associated applications when you click on a file. The one exception is eDEX-UI's settings.json file (in .config/eDEX-UI by default), which opens the configuration editor instead. This allows you to set the shell command for the terminals, change the theme, and modify several other settings for the user interface. Themes are also stored in the configuration directory and, since they are also JSON files, creating a custom theme is pretty straightforward. - -![](https://opensource.com/sites/default/files/uploads/edex-ui-3.png) - -eDEX-UI allows you to run five terminals with full emulation. The default terminal type is xterm-color, meaning it has full-color support. One thing to be aware of is that the keys light up on the keyboard while you type, so if you're using eDEX-UI on a tablet, the keyboard could present a security risk in environments where people can see the screen. It is better to use a theme without the keyboard on those devices, although it does look pretty cool when you are typing. - -![](https://opensource.com/sites/default/files/uploads/edex-ui-4.png) - -While eDEX-UI supports only five terminal windows, that has been more than enough for me. On a tablet, eDEX-UI gives me that cyberspace feel without impacting my productivity. On a desktop, eDEX-UI allows all of that and lets me look cool in front of my co-workers. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/productivity-tool-edex-ui - -作者:[Kevin Sonney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ksonney (Kevin Sonney) -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Tron -[2]: https://github.com/GitSquared/edex-ui diff --git a/translated/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md b/translated/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md new file mode 100644 index 0000000000..cce0f28165 --- /dev/null +++ b/translated/tech/20190127 Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with eDEX-UI, a Tron-influenced terminal program for tablets and desktops) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-edex-ui) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +开始使用 eDEX-UI,一款受《创:战纪》影响的平板电脑和台式机终端程序 +====== +使用 eDEX-UI 让你的工作更有趣,这是我们开源工具系列中的第 15 个工具,它将使你在 2019 年更高效。 +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx) + +每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。 + +这是我挑选出的 19 个新的(或者对你而言新的)开源工具中的第 15 个工具来帮助你在 2019 年更有效率。 + +### eDEX-UI + +当[《创:战纪》][1]上映时我才 11是岁。我不能否认,尽管这部电影充满幻想,但它对我后来的职业选择产生了影响。 + +![](https://opensource.com/sites/default/files/uploads/edex-ui-1.png) + +[eDEX-UI][2] 是一款专为平板电脑和台式机设计的跨平台终端程序,它受到《创:战纪》用户界面的启发。它在选项卡式界面中有五个终端,因此可以轻松地在任务之间切换,以及显示有用的系统信息。 + +在启动时,eDEX-UI 会启动一系列的东西,其中包含它所基于的 ElectronJS 系统的信息。启动后,eDEX-UI 会显示系统信息、文件浏览器、键盘(用于平板电脑)和主终端选项卡。其他四个选项卡(被标记为 EMPTY)没有加载任何内容,并且当你单击它时将启动一个 shell。eDEX-UI 中的默认 shell 是 Bash(如果在 Windows 上,则可能需要将其更改为 PowerShell 或 cmd.exe)。 + +![](https://opensource.com/sites/default/files/uploads/edex-ui-2.png) + +更改文件浏览器中的目录将更改活动终端中的目录,反之亦然。文件浏览器可以执行你期望的所有操作,包括在单击文件时打开关联的应用。唯一的例外是 eDEX-UI 的 settings.json 文件(默认是 .config/eDEX-UI),它会打开配置编辑器。这允许你为终端设置 shell 命令、更改主题以及修改用户界面的其他几个设置。主题也保存在配置目录中,因为它们也是 JSON 文件,所以创建自定义主题非常简单。 + +![](https://opensource.com/sites/default/files/uploads/edex-ui-3.png) + +eDEX-UI 允许你使用完全仿真运行五个终端。默认终端类型是 xterm-color,这意味着它支持全色彩。需要注意的一点是,输入时键盘会亮起,因此如果你在平板电脑上使用 eDEX-UI,键盘可能会在人们看见屏幕的环境中带来安全风险。因此最好在这些设备上使用没有键盘的主题,尽管在打字时看起来确实很酷。 + +![](https://opensource.com/sites/default/files/uploads/edex-ui-4.png) + +虽然 eDEX-UI 仅支持五个终端窗口,但这对我来说已经足够了。在平板电脑上,eDEX-UI 给了我网络空间的感觉而不会影响我的效率。在桌面上,eDEX-UI 支持所有功能,并让我在我的同事面前显得很酷。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-edex-ui + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Tron +[2]: https://github.com/GitSquared/edex-ui From 96d1081f7ecdc7ea90e227a725e128ef5f373a39 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sat, 2 Feb 2019 10:54:12 +0800 Subject: [PATCH 145/164] translating --- ...21 Get started with TaskBoard, a lightweight kanban board.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md b/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md index e77e5e3b1c..e083d650e5 100644 --- a/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md +++ b/sources/tech/20190121 Get started with TaskBoard, a lightweight kanban board.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 606f8824699967560421a64b13a05da18b8187c1 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 2 Feb 2019 13:00:54 +0800 Subject: [PATCH 146/164] Translating by MjSeven 20190117 --- ...pdate-Change Users Password in Linux Using Different Ways.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md b/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md index d3ca9cb0ab..f2125027c0 100644 --- a/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md +++ b/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d339a0bea23cca18b8defc3e3f951ed204df6972 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 2 Feb 2019 14:11:13 +0800 Subject: [PATCH 147/164] PRF:20190120 Get started with HomeBank, an open source personal finance app.md @geekpi --- ...meBank, an open source personal finance app.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md b/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md index d124db94c0..5ef2376379 100644 --- a/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md +++ b/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md @@ -1,15 +1,16 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Get started with HomeBank, an open source personal finance app) [#]: via: (https://opensource.com/article/19/1/productivity-tools-homebank) [#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) -开始使用 HomeBank,一个开源个人财务应用 +开始使用 HomeBank 吧,一款开源个人财务应用 ====== -使用 HomeBank 跟踪你的资金流向,这是我们开源工具系列中的第八个工具,它将在 2019 年提高你的工作效率。 +> 使用 HomeBank 跟踪你的资金流向,这是我们开源工具系列中的第八个工具,它将在 2019 年提高你的工作效率。 + ![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1) 每年年初似乎都有疯狂的冲动想提高工作效率。新年的决心,渴望开启新的一年,当然,“抛弃旧的,拥抱新的”的态度促成了这一切。通常这时的建议严重偏向闭源和专有软件,但事实上并不用这样。 @@ -24,7 +25,7 @@ [HomeBank][1] 是一款个人财务桌面应用,帮助你轻松跟踪你的财务状况,来帮助减少此类压力。它有很好的报告可以帮助你找出你花钱的地方,允许你设置导入交易的规则,并支持大多数现代格式。 -HomeBank 默认可在大多数发行版上可用,因此安装它非常简单。当你第一次启动它时,它将引导你完成设置并让你创建一个帐户。之后,你可以导入任意一种支持的文件格式或开始输入交易。交易簿本身就是一个交易列表。 [与其他一些应用不同][2],你不必学习[复式簿记][3]来使用 HomeBank。 +HomeBank 默认可在大多数发行版上可用,因此安装它非常简单。当你第一次启动它时,它将引导你完成设置并让你创建一个帐户。之后,你可以导入任意一种支持的文件格式或开始输入交易。交易簿本身就是一个交易列表。[与其他一些应用不同][2],你不必学习[复式记账法][3]来使用 HomeBank。 ![](https://opensource.com/sites/default/files/uploads/homebank-2.png) @@ -40,7 +41,7 @@ HomeBank 还有预算功能,允许你计划未来几个月的开销。 对我来说,最棒的功能是 HomeBank 的报告。主页面上不仅有一个图表显示你花钱的地方,而且还有许多其他报告可供你查看。如果你使用预算功能,还会有一份报告会根据预算跟踪你的支出情况。你还可以以饼图和条形图的方式查看报告。它还有趋势报告和余额报告,因此你可以回顾并查看一段时间内的变化或模式。 -总的来说,HomeBank 是一个非常友好,有用的程序,可以帮助你保持良好的财务。如果跟踪你的钱是你生活中的一件麻烦事,它使用起来很简单并且非常有用。 +总的来说,HomeBank 是一个非常友好,有用的程序,可以帮助你保持良好的财务状况。如果跟踪你的钱是你生活中的一件麻烦事,它使用起来很简单并且非常有用。 -------------------------------------------------------------------------------- @@ -50,7 +51,7 @@ via: https://opensource.com/article/19/1/productivity-tools-homebank 作者:[Kevin Sonney][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -58,4 +59,4 @@ via: https://opensource.com/article/19/1/productivity-tools-homebank [b]: https://github.com/lujun9972 [1]: http://homebank.free.fr/en/index.php [2]: https://www.gnucash.org/ -[3]: https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system \ No newline at end of file +[3]: https://en.wikipedia.org/wiki/Double-entry_bookkeeping_system From 930c36d7d2093e98c1516c26239a5814ff8a3687 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 2 Feb 2019 14:11:44 +0800 Subject: [PATCH 148/164] PUB:20190120 Get started with HomeBank, an open source personal finance app.md @geekpi https://linux.cn/article-10500-1.html --- ...rted with HomeBank, an open source personal finance app.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190120 Get started with HomeBank, an open source personal finance app.md (98%) diff --git a/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md b/published/20190120 Get started with HomeBank, an open source personal finance app.md similarity index 98% rename from translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md rename to published/20190120 Get started with HomeBank, an open source personal finance app.md index 5ef2376379..602477dd01 100644 --- a/translated/tech/20190120 Get started with HomeBank, an open source personal finance app.md +++ b/published/20190120 Get started with HomeBank, an open source personal finance app.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10500-1.html) [#]: subject: (Get started with HomeBank, an open source personal finance app) [#]: via: (https://opensource.com/article/19/1/productivity-tools-homebank) [#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) From a487104755ab5ae5ed20f21055344a78d7a7e2b4 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Sat, 2 Feb 2019 14:28:47 +0800 Subject: [PATCH 149/164] Translating Translating: fdisk - Easy Way To Manage Disk Partitions In Linux --- ...90128 fdisk - Easy Way To Manage Disk Partitions In Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md b/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md index cc89e8c7f1..85a7dfb885 100644 --- a/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md +++ b/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (zhs852) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2467cb0299d543440224972880ac13e9e0f4d207 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 15:32:57 +0800 Subject: [PATCH 150/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190130=20Get=20?= =?UTF-8?q?started=20with=20Budgie=20Desktop,=20a=20Linux=20environment=20?= =?UTF-8?q?sources/tech/20190130=20Get=20started=20with=20Budgie=20Desktop?= =?UTF-8?q?,=20a=20Linux=20environment.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ith Budgie Desktop, a Linux environment.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20190130 Get started with Budgie Desktop, a Linux environment.md diff --git a/sources/tech/20190130 Get started with Budgie Desktop, a Linux environment.md b/sources/tech/20190130 Get started with Budgie Desktop, a Linux environment.md new file mode 100644 index 0000000000..1c2389693f --- /dev/null +++ b/sources/tech/20190130 Get started with Budgie Desktop, a Linux environment.md @@ -0,0 +1,60 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Budgie Desktop, a Linux environment) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-budgie-desktop) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Get started with Budgie Desktop, a Linux environment +====== +Configure your desktop as you want with Budgie, the 18th in our series on open source tools that will make you more productive in 2019. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the 18th of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Budgie Desktop + +There are many, many desktop environments for Linux. From the easy to use and graphically stunning [GNOME desktop][1] (default on most major Linux distributions) and [KDE][2], to the minimalist [Openbox][3], to the highly configurable tiling [i3][4], there are a lot of options. What I look for in a good desktop environment is speed, unobtrusiveness, and a clean user experience. It is hard to be productive when a desktop works against you, not with or for you. + +![](https://opensource.com/sites/default/files/uploads/budgie-1.png) + +[Budgie Desktop][5] is the default desktop on the [Solus][6] Linux distribution and is available as an add-on package for most of the major Linux distributions. It is based on GNOME and uses many of the same tools and libraries you likely already have on your computer. + +The default desktop is exceptionally minimalistic, with just the panel and a blank desktop. Budgie includes an integrated sidebar (called Raven) that gives quick access to the calendar, audio controls, and settings menu. Raven also contains an integrated notification area with a unified display of system messages similar to MacOS's. + +![](https://opensource.com/sites/default/files/uploads/budgie-2.png) + +Clicking on the gear icon in Raven brings up Budgie's control panel with its configuration settings. Since Budgie is still in development, it is a little bare-bones compared to GNOME or KDE, and I hope it gets more options over time. The Top Panel option, which allows the user to configure the ordering, positioning, and contents of the top panel, is nice. + +![](https://opensource.com/sites/default/files/uploads/budgie-3.png) + +The Budgie Welcome application (presented at first login) contains options to install additional software, panel applets, snaps, and Flatpack packages. There are applets to handle networking, screenshots, additional clocks and timers, and much, much more. + +![](https://opensource.com/sites/default/files/uploads/budgie-4.png) + +Budgie provides a desktop that is clean and stable. It responds quickly and has many options that allow you to customize it as you see fit. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-budgie-desktop + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://www.gnome.org/ +[2]: https://www.kde.org/ +[3]: http://openbox.org/wiki/Main_Page +[4]: https://i3wm.org/ +[5]: https://getsol.us/solus/experiences/ +[6]: https://getsol.us/home/ From dcfc4e5c4e95a4c018088801586bf15745aaf8b7 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 2 Feb 2019 15:34:42 +0800 Subject: [PATCH 151/164] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90201?= =?UTF-8?q?90117?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Password in Linux Using Different Ways.md | 251 ------------------ ... Password in Linux Using Different Ways.md | 251 ++++++++++++++++++ 2 files changed, 251 insertions(+), 251 deletions(-) delete mode 100644 sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md create mode 100644 translated/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md diff --git a/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md b/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md deleted file mode 100644 index f2125027c0..0000000000 --- a/sources/tech/20190117 How to Update-Change Users Password in Linux Using Different Ways.md +++ /dev/null @@ -1,251 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MjSeven) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Update/Change Users Password in Linux Using Different Ways) -[#]: via: (https://www.2daygeek.com/linux-passwd-chpasswd-command-set-update-change-users-password-in-linux-using-shell-script/) -[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/) - -How to Update/Change Users Password in Linux Using Different Ways -====== - -It’s a basic thing to set a user password whenever you create an user account in Linux. - -Everybody uses passwd command followed by the user name `passwd USERNAME` to set a password for a user. - -Make sure you have to set a hard and guess password that will help you to make the system more secure. - -I mean to say, it should be the combination of Alphabets, Symbols and numbers. - -Also, i advise you to change the password at least once in a month for security reason. - -When you use the passwd command it will ask you to enter the password twice to set it. It’s a native method to set a user password. - -If you don’t want to update the password twice and would like to do this in different way? - -Yes, we can. There will be a possibility to do. - -If you are working as a Linux admin you might have asked the below questions many times. - -Some of you may or may not got answer for these questions. - -Whatever it’s, don’t worry we are here to answer your all questions. - - * How to Update/Change Users Password in Single Command? - * How to Update/Change a Same Password for Multiple users in Linux? - * How to Update/Change Multiple Users Password in Linux? - * How to Update/Change Password for Multiple Users in Linux? - * How to Update/Change Different Password for Multiple Users in Linux? - * How to Update/Change Users Password in Multiple Linux Servers? - * How to Update/Change Multiple Users Password in Multiple Linux Servers? - - - -### Method-1: Using passwd Command - -passwd command is a standard method to set or update or change password for users in Linux. The below way is a standard method to do it. - -``` -# passwd renu -Changing password for user renu. -New password: -BAD PASSWORD: The password contains the user name in some form -Retype new password: -passwd: all authentication tokens updated successfully. -``` - -Run the following command if you would like to set or change password with single command. This allow users to update password in a single command. - -``` -# echo "new_password" | passwd --stdin thanu -Changing password for user thanu. -passwd: all authentication tokens updated successfully. -``` - -### Method-2: Using chpasswd Command - -chpasswd is an another command will allow us to set or update or change password for users in Linux. Use the following format if you would like to use chpasswd command to change password for user in a single command. - -``` -# echo "thanu:new_password" | chpasswd -``` - -### Method-3: How to Set Different Password for Multiple Users - -Use the below script if you would like to set or update or change a password for multiple users in Linux with different password. - -To do so, first we need to get a users list by using the following command. The below command will list the users who’s having `/home` directory and redirect the output to `user-list.txt` file. - -``` -# cat /etc/passwd | grep "/home" | cut -d":" -f1 > user-list.txt -``` - -List out the users using cat command. Remove the user from the list if you don’t want to reset the password for the specific user. - -``` -# cat user-list.txt -centos -magi -daygeek -thanu -renu -``` - -Create a following small shell script to achieve this. - -``` -# vi password-update.sh - -#!/bin/sh -for user in `more user-list.txt` -do -echo "[email protected]" | passwd --stdin "$user" -chage -d 0 $user -done -``` - -Set an executable permission to `password-update.sh` file. - -``` -# chmod +x password-update.sh -``` - -Finally run the script to achieve this. - -``` -# ./password-up.sh - -magi -Changing password for user magi. -passwd: all authentication tokens updated successfully. -daygeek -Changing password for user daygeek. -passwd: all authentication tokens updated successfully. -thanu -Changing password for user thanu. -passwd: all authentication tokens updated successfully. -renu -Changing password for user renu. -passwd: all authentication tokens updated successfully. -``` - -### Method-4: How to Set a Same Password for Multiple Users - -Use the below script if you would like to set or update or change a same password for multiple users in Linux. - -``` -# vi password-update.sh - -#!/bin/sh -for user in `more user-list.txt` -do -echo "new_password" | passwd --stdin "$user" -chage -d 0 $user -done -``` - -### Method-5: How to Change User password in Multiple Servers - -Use the following script if you want to change a user password in multiple servers. In my case, we are going to change a password for `renu` user. Make sure you have to give the user name which you want to update the password instead of us. - -Make sure you have to update the servers list into `server-list.txt` file. Each server should be in separate line. - -``` -# vi password-update.sh - -#!/bin/bash -for server in `cat server-list.txt` -do -ssh [email protected]$server 'passwd --stdin renu < user-list.txt +``` + +使用 cat 命令列出用户。如果你不想重置特定用户的密码,那么从列表中移除该用户。 + +``` +# cat user-list.txt +centos +magi +daygeek +thanu +renu +``` + +创建以下小 shell 脚本来实现此目的。 + +``` +# vi password-update.sh + +#!/bin/sh +for user in `more user-list.txt` +do +echo "[email protected]" | passwd --stdin "$user" +chage -d 0 $user +done +``` + +给 `password-update.sh` 文件设置可执行权限。 + +``` +# chmod +x password-update.sh +``` + +最后运行脚本来实现这一目标。 + +``` +# ./password-up.sh + +magi +Changing password for user magi. +passwd: all authentication tokens updated successfully. +daygeek +Changing password for user daygeek. +passwd: all authentication tokens updated successfully. +thanu +Changing password for user thanu. +passwd: all authentication tokens updated successfully. +renu +Changing password for user renu. +passwd: all authentication tokens updated successfully. +``` + +### 方法-4: 如何为多个用户设置相同的密码 + +如果要在 Linux 中为多个用户设置,更新或更改相同的密码,使用以下脚本。 + +``` +# vi password-update.sh + +#!/bin/sh +for user in `more user-list.txt` +do +echo "new_password" | passwd --stdin "$user" +chage -d 0 $user +done +``` + +### 方法-5: 如何在多个服务器中更改用户密码 + +如果希望更改多个服务器中的用户密码,使用以下脚本。在本例中,我们将更改 `renu` 用户的密码,确保你必须提供你希望更新密码的用户名而不是我们的用户名。 + +确保你必须将服务器列表保存在 `server-list.txt` 文件中,每个服务器应该在单独一行中。 + +``` +# vi password-update.sh + +#!/bin/bash +for server in `cat server-list.txt` +do +ssh [email protected]$server 'passwd --stdin renu < Date: Sat, 2 Feb 2019 15:40:17 +0800 Subject: [PATCH 152/164] translated --- ...ew text files at the Linux command line.md | 92 ------------------ ...ew text files at the Linux command line.md | 95 +++++++++++++++++++ 2 files changed, 95 insertions(+), 92 deletions(-) delete mode 100644 sources/tech/20190128 Using more to view text files at the Linux command line.md create mode 100644 translated/tech/20190128 Using more to view text files at the Linux command line.md diff --git a/sources/tech/20190128 Using more to view text files at the Linux command line.md b/sources/tech/20190128 Using more to view text files at the Linux command line.md deleted file mode 100644 index bc7c9a3c8d..0000000000 --- a/sources/tech/20190128 Using more to view text files at the Linux command line.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( dianbanjiu ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using more to view text files at the Linux command line) -[#]: via: (https://opensource.com/article/19/1/more-text-files-linux) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Using more to view text files at the Linux command line -====== -Text files and Linux go hand in hand. Or so it seems. But how you view those text files depends on what tools you're comfortable with. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE) - -There are a number of utilities that enable you to view text files when you're at the command line. One of them is [**more**][1]. - -**more** is similar to another tool I wrote about called **[less][2]**. The main difference is that **more** only allows you to move forward in a file. - -While that may seem limiting, it has some useful features that are good to know about. Let's take a quick look at what **more** can do and how to use it. - -### The basics - -Let's say you have a text file and want to read it at the command line. Just open the terminal, pop into the directory that contains the file, and type this command: - -``` -more -``` - -For example, **more jekyll-article.md**. - -![](https://opensource.com/sites/default/files/uploads/more-viewing-file.png) - -Press the Spacebar on your keyboard to move through the file or press **q** to quit. - -If you want to search for some text in the file, press the **/** key followed by the word or term you want to find. For example, to find the phrase terminal, type: - -``` -/terminal -``` - -![](https://opensource.com/sites/default/files/uploads/more-searching.png) - -Search is case-sensitive. Typing Terminal isn't the same as typing terminal. - -### Using more with other utilities - -You can pipe text from other command line utilities into **more**. Why do that? Because sometimes the text that those tools spew out spans more than one page. - -To do that, type the command and any options, followed by the pipe symbol ( **|** ), followed by **more**. For example, let's say you have a directory that has a large number of files in it. You can use **more** with the **ls** command to get a full view of the contents of the directory: - -``` -ls | more -``` - -![](https://opensource.com/sites/default/files/uploads/more-with_ls_cmd.png) - -You can also use **more** with the **grep** command to find text in multiple files. In this example, I use **grep** to find the text productivity in multiple source files for my articles: - -``` -**grep ‘productivity’ core.md Dict.md lctt2014.md lctt2016.md lctt2018.md README.md | more** -``` - -![](https://opensource.com/sites/default/files/uploads/more-with_grep_cmd.png) - -Another utility you can combine with **more** is **ps** (which lists processes that are running on your system). Again, this comes in handy when there are a large number of processes running on your system and you need a view of all of them—for example, to find one that you need to kill. To do that, use this command: - -``` -ps -u scott | more -``` - -Note that you'd replace scott with your username. - -![](https://opensource.com/sites/default/files/uploads/more-with_ps_cmd.png) - -As I mentioned at the beginning of this article, **more** is easy to use. It's definitely not as flexible as its cousin **less** , but it can be useful to know. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/more-text-files-linux - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/More_(command) -[2]: https://opensource.com/article/18/4/using-less-view-text-files-command-line diff --git a/translated/tech/20190128 Using more to view text files at the Linux command line.md b/translated/tech/20190128 Using more to view text files at the Linux command line.md new file mode 100644 index 0000000000..f10ac248fc --- /dev/null +++ b/translated/tech/20190128 Using more to view text files at the Linux command line.md @@ -0,0 +1,95 @@ +[#]: collector: (lujun9972) +[#]: translator: ( dianbanjiu ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using more to view text files at the Linux command line) +[#]: via: (https://opensource.com/article/19/1/more-text-files-linux) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) + +在 Linux 命令行使用 more 查看文本文件 +====== +文本文件和 Linux 一直是携手并进的。或者说看起来如此。那你又是依靠哪些让你使用起来很舒服的工具来查看这些文本文件的呢? + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE) + +Linux 下有很多实用工具可以让你在终端界面查看文本文件。其中一个就是 [**more**][1]。 + +**more** 跟我之前另一篇文章里写到的工具 —— **[less][2]** 很相似。它们之间的主要不同点在于 **more** 只允许你向前查看文件。 + +尽管它能提供的功能看起来很有限,不过它依旧有很多有用的特性值得你去了解。下面让我们来快速浏览一下 **more** 可以做什么,以及如何使用它吧。 + +### 基础使用 + +假设你现在想在终端查看一个文本文件。只需打开一个终端,进入对应的目录,然后输入以下命令: + +```shell +$ more +``` + +例如, + +```shell +$ more jekyll-article.md +``` + +![](https://opensource.com/sites/default/files/uploads/more-viewing-file.png) + +使用空格键可以向下翻页,输入 **q** 可以退出。 + +如果你想在这个文件中搜索一些文本,输入 **/** 字符并在其后加上你想要查找的文字。例如你要查看的字段是 terminal,只需输入: + +``` +/terminal +``` + +![](https://opensource.com/sites/default/files/uploads/more-searching.png) + +搜索的内容是区分大小写的,所以输入 /terminal 跟 /Terminal 会出现不同的结果。 + +### 和其他实用工具组合使用 +你可以通过管道将其他命令行工具得到的文本传输到 **more**。你问为什么这样做?因为有时这些工具获取的文本会超过终端一页可以显示的限度。 + +想要做到这个,先输入你想要使用的完整命令,后面跟上管道符(**|**),管道符后跟 **more**。假设现在有一个有很多文件的目录。你就可以组合 **more** 跟 **ls** 命令完整查看这个目录当中的内容。 + +```shell +$ ls | more +``` + +![](https://opensource.com/sites/default/files/uploads/more-with_ls_cmd.png) + +你可以组合 **more** 和 **grep** 命令,从而实现在多个文件中找到指定的文本。下面是我在多篇文章的源文件中查找 productivity 的例子。 + +```shell +$ grep ‘productivity’ core.md Dict.md lctt2014.md lctt2016.md lctt2018.md README.md | more +``` + +![](https://opensource.com/sites/default/files/uploads/more-with_grep_cmd.png) + +另外一个可以和 **more** 组合的实用工具是 **ps**(列出你系统上正在运行的进程)。当你的系统上运行了很多的进程,你现在想要查看他们的时候,这个组合将会派上用场。例如你想找到一个你需要杀死的进程,只需输入下面的命令: + +```shell +$ ps -u scott | more +``` + +注意用你的用户名替换掉 scott。 + +![](https://opensource.com/sites/default/files/uploads/more-with_ps_cmd.png) + +就像我文章开篇提到的, **more** 很容易使用。尽管不如它的双胞胎兄弟 **less** 那般灵活,但是仍然值得了解一下。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/more-text-files-linux + +作者:[Scott Nesbitt][a] +选题:[lujun9972][b] +译者:[dianbanjiu](https://github.com/dianbanjiu) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/scottnesbitt +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/More_(command) +[2]: https://opensource.com/article/18/4/using-less-view-text-files-command-line From 4bab7ec7bbc3012efcf28a0f7fd99835667c17b3 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 15:52:20 +0800 Subject: [PATCH 153/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190116=20GameHu?= =?UTF-8?q?b=20=E2=80=93=20An=20Unified=20Library=20To=20Put=20All=20Games?= =?UTF-8?q?=20Under=20One=20Roof=20sources/tech/20190116=20GameHub=20-=20A?= =?UTF-8?q?n=20Unified=20Library=20To=20Put=20All=20Games=20Under=20One=20?= =?UTF-8?q?Roof.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...Library To Put All Games Under One Roof.md | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 sources/tech/20190116 GameHub - An Unified Library To Put All Games Under One Roof.md diff --git a/sources/tech/20190116 GameHub - An Unified Library To Put All Games Under One Roof.md b/sources/tech/20190116 GameHub - An Unified Library To Put All Games Under One Roof.md new file mode 100644 index 0000000000..bdaae74b43 --- /dev/null +++ b/sources/tech/20190116 GameHub - An Unified Library To Put All Games Under One Roof.md @@ -0,0 +1,139 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GameHub – An Unified Library To Put All Games Under One Roof) +[#]: via: (https://www.ostechnix.com/gamehub-an-unified-library-to-put-all-games-under-one-roof/) +[#]: author: (SK https://www.ostechnix.com/author/sk/) + +GameHub – An Unified Library To Put All Games Under One Roof +====== + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/gamehub-720x340.png) + +**GameHub** is an unified gaming library that allows you to view, install, run and remove games on GNU/Linux operating system. It supports both native and non-native games from various sources including Steam, GOG, Humble Bundle, and Humble Trove etc. The non-native games are supported by [Wine][1], Proton, [DOSBox][2], ScummVM and RetroArch. It also allows you to add custom emulators and download bonus content and DLCs for GOG games. Simply put, Gamehub is a frontend for Steam/GoG/Humblebundle/Retroarch. It can use steam technologies like Proton to run windows gog games. GameHub is free, open source gaming platform written in **Vala** using **GTK+3**. If you’re looking for a way to manage all games under one roof, GameHub might be a good choice. + +### Installing GameHub + +The author of GameHub has designed it specifically for elementary OS. So, you can install it on Debian, Ubuntu, elementary OS and other Ubuntu-derivatives using GameHub PPA. + +``` +$ sudo apt install --no-install-recommends software-properties-common +$ sudo add-apt-repository ppa:tkashkin/gamehub +$ sudo apt update +$ sudo apt install com.github.tkashkin.gamehub +``` + +GameHub is available in [**AUR**][3], so just install it on Arch Linux and its variants using any AUR helpers, for example [**YaY**][4]. + +``` +$ yay -S gamehub-git +``` + +It is also available as **AppImage** and **Flatpak** packages in [**releases page**][5]. + +If you prefer AppImage package, do the following: + +``` +$ wget https://github.com/tkashkin/GameHub/releases/download/0.12.1-91-dev/GameHub-bionic-0.12.1-91-dev-cd55bb5-x86_64.AppImage -O gamehub +``` + +Make it executable: + +``` +$ chmod +x gamehub +``` + +And, run GameHub using command: + +``` +$ ./gamehub +``` + +If you want to use Flatpak installer, run the following commands one by one. + +``` +$ git clone https://github.com/tkashkin/GameHub.git +$ cd GameHub +$ scripts/build.sh build_flatpak +``` + +### Put All Games Under One Roof + +Launch GameHub from menu or application launcher. At first launch, you will see the following welcome screen. + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/gamehub1.png) + +As you can see in the above screenshot, you need to login to the given sources namely Steam, GoG or Humble Bundle. If you don’t have Steam client on your Linux system, you need to install it first to access your steam account. For GoG and Humble bundle sources, click on the icon to log in to the respective source. + +Once you logged in to your account(s), all games from the all sources can be visible on GameHub dashboard. + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/gamehub2.png) + +You will see list of logged-in sources on the top left corner. To view the games from each source, just click on the respective icon. + +You can also switch between list view or grid view, sort the games by applying the filters and search games from the list in GameHub dashboard. + +#### Installing a game + +Click on the game of your choice from the list and click Install button. If the game is non-native, GameHub will automatically choose the compatibility layer (E.g Wine) that suits to run the game and install the selected game. As you see in the below screenshot, Indiana Jones game is not available for Linux platform. + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/gamehub3-1.png) + +If it is a native game (i.e supports Linux), simply press the Install button. + +![][7] + +If you don’t want to install the game, just hit the **Download** button to save it in your games directory. It is also possible to add locally installed games to GameHub using the **Import** option. + +![](https://www.ostechnix.com/wp-content/uploads/2019/01/gamehub5.png) + +#### GameHub Settings + +GameHub Settings window can be launched by clicking on the four straight lines on top right corner. + +From Settings section, we can enable, disable and set various settings such as, + + * Switch between light/dark themes. + * Use Symbolic icons instead of colored icons for games. + * Switch to compact list. + * Enable/disable merging games from different sources. + * Enable/disable compatibility layers. + * Set games collection directory. The default directory for storing the collection is **$HOME/Games/_Collection**. + * Set games directories for each source. + * Add/remove emulators, + * And many. + + + +For more details, refer the project links given at the end of this guide. + +**Related read:** + +And, that’s all for now. Hope this helps. I will be soon here with another guide. Until then, stay tuned with OSTechNix. + +Cheers! + + + +-------------------------------------------------------------------------------- + +via: https://www.ostechnix.com/gamehub-an-unified-library-to-put-all-games-under-one-roof/ + +作者:[SK][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.ostechnix.com/author/sk/ +[b]: https://github.com/lujun9972 +[1]: https://www.ostechnix.com/run-windows-games-softwares-ubuntu-16-04/ +[2]: https://www.ostechnix.com/how-to-run-ms-dos-games-and-programs-in-linux/ +[3]: https://aur.archlinux.org/packages/gamehub-git/ +[4]: https://www.ostechnix.com/yay-found-yet-another-reliable-aur-helper/ +[5]: https://github.com/tkashkin/GameHub/releases +[6]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[7]: http://www.ostechnix.com/wp-content/uploads/2019/01/gamehub4.png From 1cc30c456ab96d30cbb5e0c6f972bede6e5df75f Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 15:56:04 +0800 Subject: [PATCH 154/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190116=20Best?= =?UTF-8?q?=20Audio=20Editors=20For=20Linux=20sources/tech/20190116=20Best?= =?UTF-8?q?=20Audio=20Editors=20For=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190116 Best Audio Editors For Linux.md | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 sources/tech/20190116 Best Audio Editors For Linux.md diff --git a/sources/tech/20190116 Best Audio Editors For Linux.md b/sources/tech/20190116 Best Audio Editors For Linux.md new file mode 100644 index 0000000000..d588c886e2 --- /dev/null +++ b/sources/tech/20190116 Best Audio Editors For Linux.md @@ -0,0 +1,156 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Best Audio Editors For Linux) +[#]: via: (https://itsfoss.com/best-audio-editors-linux) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Best Audio Editors For Linux +====== + +You’ve got a lot of choices when it comes to audio editors for Linux. No matter whether you are a professional music producer or just learning to create awesome music, the audio editors will always come in handy. + +Well, for professional-grade usage, a [DAW][1] (Digital Audio Workstation) is always recommended. However, not everyone needs all the functionalities, so you should know about some of the most simple audio editors as well. + +In this article, we will talk about a couple of DAWs and basic audio editors which are available as **free and open source** solutions for Linux and (probably) for other operating systems. + +### Top Audio Editors for Linux + +![Best audio editors and DAW for Linux][2] + +We will not be focusing on all the functionalities that DAWs offer – but the basic audio editing capabilities. You may still consider this as the list of best DAW for Linux. + +**Installation instruction:** You will find all the mentioned audio editors or DAWs in your AppCenter or Software center. In case, you do not find them listed, please head to their official website for more information. + +#### 1\. Audacity + +![audacity audio editor][3] + +Audacity is one of the most basic yet a capable audio editor available for Linux. It is a free and open-source cross-platform tool. A lot of you must be already knowing about it. + +It has improved a lot when compared to the time when it started trending. I do recall that I utilized it to “try” making karaokes by removing the voice from an audio file. Well, you can still do it – but it depends. + +**Features:** + +It also supports plug-ins that include VST effects. Of course, you should not expect it to support VST Instruments. + + * Live audio recording through a microphone or a mixer + * Export/Import capability supporting multiple formats and multiple files at the same time + * Plugin support: LADSPA, LV2, Nyquist, VST and Audio Unit effect plug-ins + * Easy editing with cut, paste, delete and copy functions. + * Spectogram view mode for analyzing frequencies + + + +#### 2\. LMMS + +![][4] + +LMMS is a free and open source (cross-platform) digital audio workstation. It includes all the basic audio editing functionalities along with a lot of advanced features. + +You can mix sounds, arrange them, or create them using VST instruments. It does support them. Also, it comes baked in with some samples, presets, VST Instruments, and effects to get started. In addition, you also get a spectrum analyzer for some advanced audio editing. + +**Features:** + + * Note playback via MIDI + * VST Instrument support + * Native multi-sample support + * Built-in compressor, limiter, delay, reverb, distortion and bass enhancer + + + +#### 3\. Ardour + +![Ardour audio editor][5] + +Ardour is yet another free and open source digital audio workstation. If you have an audio interface, Ardour will support it. Of course, you can add unlimited multichannel tracks. The multichannel tracks can also be routed to different mixer tapes for the ease of editing and recording. + +You can also import a video to it and edit the audio to export the whole thing. It comes with a lot of built-in plugins and supports VST plugins as well. + +**Features:** + + * Non-linear editing + * Vertical window stacking for easy navigation + * Strip silence, push-pull trimming, Rhythm Ferret for transient and note onset-based editing + + + +#### 4\. Cecilia + +![cecilia audio editor][6] + +Cecilia is not an ordinary audio editor application. It is meant to be used by sound designers or if you are just in the process of becoming one. It is technically an audio signal processing environment. It lets you create ear-bending sound out of them. + +You get in-build modules and plugins for sound effects and synthesis. It is tailored for a specific use – if that is what you were looking for – look no further! + +**Features:** + + * Modules to achieve more (UltimateGrainer – A state-of-the-art granulation processing, RandomAccumulator – Variable speed recording accumulator, +UpDistoRes – Distortion with upsampling and resonant lowpass filter) + * Automatic Saving of modulations + + + +#### 5\. Mixxx + +![Mixxx audio DJ ][7] + +If you want to mix and record something while being able to have a virtual DJ tool, [Mixxx][8] would be a perfect tool. You get to know the BPM, key, and utilize the master sync feature to match the tempo and beats of a song. Also, do not forget that it is yet another free and open source application for Linux! + +It supports custom DJ equipment as well. So, if you have one or a MIDI – you can record your live mixes using this tool. + +**Features** + + * Broadcast and record DJ Mixes of your song + * Ability to connect your equipment and perform live + * Key detection and BPM detection + + + +#### 6\. Rosegarden + +![rosegarden audio editor][9] + +Rosegarden is yet another impressive audio editor for Linux which is free and open source. It is neither a fully featured DAW nor a basic audio editing tool. It is a mixture of both with some scaled down functionalities. + +I wouldn’t recommend this for professionals but if you have a home studio or just want to experiment, this would be one of the best audio editors for Linux to have installed. + +**Features:** + + * Music notation editing + * Recording, Mixing, and samples + + + +### Wrapping Up + +These are some of the best audio editors you could find out there for Linux. No matter whether you need a DAW, a cut-paste editing tool, or a basic mixing/recording audio editor, the above-mentioned tools should help you out. + +Did we miss any of your favorite? Let us know about it in the comments below. + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-audio-editors-linux + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Digital_audio_workstation +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors-800x450.jpeg?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/audacity-audio-editor.jpg?fit=800%2C591&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/lmms-daw.jpg?fit=800%2C472&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/ardour-audio-editor.jpg?fit=800%2C639&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/cecilia.jpg?fit=800%2C510&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/mixxx.jpg?fit=800%2C486&ssl=1 +[8]: https://itsfoss.com/dj-mixxx-2/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/rosegarden.jpg?fit=800%2C391&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1 From 9d1c96e0bee5a42498bded345444dc6c5a1c85ae Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 15:59:35 +0800 Subject: [PATCH 155/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190116=20The=20?= =?UTF-8?q?Evil-Twin=20Framework:=20A=20tool=20for=20improving=20WiFi=20se?= =?UTF-8?q?curity=20sources/tech/20190116=20The=20Evil-Twin=20Framework-?= =?UTF-8?q?=20A=20tool=20for=20improving=20WiFi=20security.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ork- A tool for improving WiFi security.md | 236 ++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 sources/tech/20190116 The Evil-Twin Framework- A tool for improving WiFi security.md diff --git a/sources/tech/20190116 The Evil-Twin Framework- A tool for improving WiFi security.md b/sources/tech/20190116 The Evil-Twin Framework- A tool for improving WiFi security.md new file mode 100644 index 0000000000..81b5d2ddf1 --- /dev/null +++ b/sources/tech/20190116 The Evil-Twin Framework- A tool for improving WiFi security.md @@ -0,0 +1,236 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The Evil-Twin Framework: A tool for improving WiFi security) +[#]: via: (https://opensource.com/article/19/1/evil-twin-framework) +[#]: author: (André Esser https://opensource.com/users/andreesser) + +The Evil-Twin Framework: A tool for improving WiFi security +====== +Learn about a pen-testing tool intended to test the security of WiFi access points for all types of threats. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-cloud-safe.png?itok=yj2TFPzq) + +The increasing number of devices that connect over-the-air to the internet over-the-air and the wide availability of WiFi access points provide many opportunities for attackers to exploit users. By tricking users to connect to [rogue access points][1], hackers gain full control over the users' network connection, which allows them to sniff and alter traffic, redirect users to malicious sites, and launch other attacks over the network.. + +To protect users and teach them to avoid risky online behaviors, security auditors and researchers must evaluate users' security practices and understand the reasons they connect to WiFi access points without being confident they are safe. There are a significant number of tools that can conduct WiFi audits, but no single tool can test the many different attack scenarios and none of the tools integrate well with one another. + +The **Evil-Twin Framework** (ETF) aims to fix these problems in the WiFi auditing process by enabling auditors to examine multiple scenarios and integrate multiple tools. This article describes the framework and its functionalities, then provides some examples to show how it can be used. + +### The ETF architecture + +The ETF framework was written in [Python][2] because the development language is very easy to read and make contributions to. In addition, many of the ETF's libraries, such as **[Scapy][3]** , were already developed for Python, making it easy to use them for ETF. + +The ETF architecture (Figure 1) is divided into different modules that interact with each other. The framework's settings are all written in a single configuration file. The user can verify and edit the settings through the user interface via the **ConfigurationManager** class. Other modules can only read these settings and run according to them. + +![Evil-Twin Framework Architecture][5] + +Figure 1: Evil-Twin framework architecture + +The ETF supports multiple user interfaces that interact with the framework. The current default interface is an interactive console, similar to the one on [Metasploit][6]. A graphical user interface (GUI) and a command line interface (CLI) are under development for desktop/browser use, and mobile interfaces may be an option in the future. The user can edit the settings in the configuration file using the interactive console (and eventually with the GUI). The user interface can interact with every other module that exists in the framework. + +The WiFi module ( **AirCommunicator** ) was built to support a wide range of WiFi capabilities and attacks. The framework identifies three basic pillars of Wi-Fi communication: **packet sniffing** , **custom packet injection** , and **access point creation**. The three main WiFi communication modules are **AirScanner** , **AirInjector** , and **AirHost** , which are responsible for packet sniffing, packet injection, and access point creation, respectively. The three classes are wrapped inside the main WiFi module, AirCommunicator, which reads the configuration file before starting the services. Any type of WiFi attack can be built using one or more of these core features. + +To enable man-in-the-middle (MITM) attacks, which are a common way to attack WiFi clients, the framework has an integrated module called ETFITM (Evil-Twin Framework-in-the-Middle). This module is responsible for the creation of a web proxy used to intercept and manipulate HTTP/HTTPS traffic. + +There are many other tools that can leverage the MITM position created by the ETF. Through its extensibility, ETF can support them—and, instead of having to call them separately, you can add the tools to the framework just by extending the Spawner class. This enables a developer or security auditor to call the program with a preconfigured argument string from within the framework. + +The other way to extend the framework is through plugins. There are two categories of plugins: **WiFi plugins** and **MITM plugins**. MITM plugins are scripts that can run while the MITM proxy is active. The proxy passes the HTTP(S) requests and responses through to the plugins where they can be logged or manipulated. WiFi plugins follow a more complex flow of execution but still expose a fairly simple API to contributors who wish to develop and use their own plugins. WiFi plugins can be further divided into three categories, one for each of the core WiFi communication modules. + +Each of the core modules has certain events that trigger the execution of a plugin. For instance, AirScanner has three defined events to which a response can be programmed. The events usually correspond to a setup phase before the service starts running, a mid-execution phase while the service is running, and a teardown or cleanup phase after a service finishes. Since Python allows multiple inheritance, one plugin can subclass more than one plugin class. + +Figure 1 above is a summary of the framework's architecture. Lines pointing away from the ConfigurationManager mean that the module reads information from it and lines pointing towards it mean that the module can write/edit configurations. + +### Examples of using the Evil-Twin Framework + +There are a variety of ways ETF can conduct penetration testing on WiFi network security or work on end users' awareness of WiFi security. The following examples describe some of the framework's pen-testing functionalities, such as access point and client detection, WPA and WEP access point attacks, and evil twin access point creation. + +These examples were devised using ETF with WiFi cards that allow WiFi traffic capture. They also utilize the following abbreviations for ETF setup commands: + + * **APS** access point SSID + * **APB** access point BSSID + * **APC** access point channel + * **CM** client MAC address + + + +In a real testing scenario, make sure to replace these abbreviations with the correct information. + +#### Capturing a WPA 4-way handshake after a de-authentication attack + +This scenario (Figure 2) takes two aspects into consideration: the de-authentication attack and the possibility of catching a 4-way WPA handshake. The scenario starts with a running WPA/WPA2-enabled access point with one connected client device (in this case, a smartphone). The goal is to de-authenticate the client with a general de-authentication attack then capture the WPA handshake once it tries to reconnect. The reconnection will be done manually immediately after being de-authenticated. + +![Scenario for capturing a WPA handshake after a de-authentication attack][8] + +Figure 2: Scenario for capturing a WPA handshake after a de-authentication attack + +The consideration in this example is the ETF's reliability. The goal is to find out if the tools can consistently capture the WPA handshake. The scenario will be performed multiple times with each tool to check its reliability when capturing the WPA handshake. + +There is more than one way to capture a WPA handshake using the ETF. One way is to use a combination of the AirScanner and AirInjector modules; another way is to just use the AirInjector. The following scenario uses a combination of both modules. + +The ETF launches the AirScanner module and analyzes the IEEE 802.11 frames to find a WPA handshake. Then the AirInjector can launch a de-authentication attack to force a reconnection. The following steps must be done to accomplish this on the ETF: + + 1. Enter the AirScanner configuration mode: **config airscanner** + 2. Configure the AirScanner to not hop channels: **config airscanner** + 3. Set the channel to sniff the traffic on the access point channel (APC): **set fixed_sniffing_channel = ** + 4. Start the AirScanner module with the CredentialSniffer plugin: **start airscanner with credentialsniffer** + 5. Add a target access point BSSID (APS) from the sniffed access points list: **add aps where ssid = ** + 6. Start the AirInjector, which by default lauches the de-authentication attack: **start airinjector** + + + +This simple set of commands enables the ETF to perform an efficient and successful de-authentication attack on every test run. The ETF can also capture the WPA handshake on every test run. The following code makes it possible to observe the ETF's successful execution. + +``` +███████╗████████╗███████╗ +██╔════╝╚══██╔══╝██╔════╝ +█████╗     ██║   █████╗   +██╔══╝     ██║   ██╔══╝   +███████╗   ██║   ██║     +╚══════╝   ╚═╝   ╚═╝     +                                        + +[+] Do you want to load an older session? [Y/n]: n +[+] Creating new temporary session on 02/08/2018 +[+] Enter the desired session name: +ETF[etf/aircommunicator/]::> config airscanner +ETF[etf/aircommunicator/airscanner]::> listargs +  sniffing_interface =               wlan1; (var) +              probes =                True; (var) +             beacons =                True; (var) +        hop_channels =               false; (var) +fixed_sniffing_channel =                  11; (var) +ETF[etf/aircommunicator/airscanner]::> start airscanner with +arpreplayer        caffelatte         credentialsniffer  packetlogger       selfishwifi         +ETF[etf/aircommunicator/airscanner]::> start airscanner with credentialsniffer +[+] Successfully added credentialsniffer plugin. +[+] Starting packet sniffer on interface 'wlan1' +[+] Set fixed channel to 11 +ETF[etf/aircommunicator/airscanner]::> add aps where ssid = CrackWPA +ETF[etf/aircommunicator/airscanner]::> start airinjector +ETF[etf/aircommunicator/airscanner]::> [+] Starting deauthentication attack +                    - 1000 bursts of 1 packets +                    - 1 different packets +[+] Injection attacks finished executing. +[+] Starting post injection methods +[+] Post injection methods finished +[+] WPA Handshake found for client '70:3e:ac:bb:78:64' and network 'CrackWPA' +``` + +#### Launching an ARP replay attack and cracking a WEP network + +The next scenario (Figure 3) will also focus on the [Address Resolution Protocol][9] (ARP) replay attack's efficiency and the speed of capturing the WEP data packets containing the initialization vectors (IVs). The same network may require a different number of caught IVs to be cracked, so the limit for this scenario is 50,000 IVs. If the network is cracked during the first test with less than 50,000 IVs, that number will be the new limit for the following tests on the network. The cracking tool to be used will be **aircrack-ng**. + +The test scenario starts with an access point using WEP encryption and an offline client that knows the key—the key for testing purposes is 12345, but it can be a larger and more complex key. Once the client connects to the WEP access point, it will send out a gratuitous ARP packet; this is the packet that's meant to be captured and replayed. The test ends once the limit of packets containing IVs is captured. + +![Scenario for capturing a WPA handshake after a de-authentication attack][11] + +Figure 3: Scenario for capturing a WPA handshake after a de-authentication attack + +ETF uses Python's Scapy library for packet sniffing and injection. To minimize known performance problems in Scapy, ETF tweaks some of its low-level libraries to significantly speed packet injection. For this specific scenario, the ETF uses **tcpdump** as a background process instead of Scapy for more efficient packet sniffing, while Scapy is used to identify the encrypted ARP packet. + +This scenario requires the following commands and operations to be performed on the ETF: + + 1. Enter the AirScanner configuration mode: **config airscanner** + 2. Configure the AirScanner to not hop channels: **set hop_channels = false** + 3. Set the channel to sniff the traffic on the access point channel (APC): **set fixed_sniffing_channel = ** + 4. Enter the ARPReplayer plugin configuration mode: **config arpreplayer** + 5. Set the target access point BSSID (APB) of the WEP network: **set target_ap_bssid ** + 6. Start the AirScanner module with the ARPReplayer plugin: **start airscanner with arpreplayer** + + + +After executing these commands, ETF correctly identifies the encrypted ARP packet, then successfully performs an ARP replay attack, which cracks the network. + +#### Launching a catch-all honeypot + +The scenario in Figure 4 creates multiple access points with the same SSID. This technique discovers the encryption type of a network that was probed for but out of reach. By launching multiple access points with all security settings, the client will automatically connect to the one that matches the security settings of the locally cached access point information. + +![Scenario for capturing a WPA handshake after a de-authentication attack][13] + +Figure 4: Scenario for capturing a WPA handshake after a de-authentication attack + +Using the ETF, it is possible to configure the **hostapd** configuration file then launch the program in the background. Hostapd supports launching multiple access points on the same wireless card by configuring virtual interfaces, and since it supports all types of security configurations, a complete catch-all honeypot can be set up. For the WEP and WPA(2)-PSK networks, a default password is used, and for the WPA(2)-EAP, an "accept all" policy is configured. + +For this scenario, the following commands and operations must be performed on the ETF: + + 1. Enter the APLauncher configuration mode: **config aplauncher** + 2. Set the desired access point SSID (APS): **set ssid = ** + 3. Configure the APLauncher as a catch-all honeypot: **set catch_all_honeypot = true** + 4. Start the AirHost module: **start airhost** + + + +With these commands, the ETF can launch a complete catch-all honeypot with all types of security configurations. ETF also automatically launches the DHCP and DNS servers that allow clients to stay connected to the internet. ETF offers a better, faster, and more complete solution to create catch-all honeypots. The following code enables the successful execution of the ETF to be observed. + +``` +███████╗████████╗███████╗ +██╔════╝╚══██╔══╝██╔════╝ +█████╗     ██║   █████╗   +██╔══╝     ██║   ██╔══╝   +███████╗   ██║   ██║     +╚══════╝   ╚═╝   ╚═╝     +                                        + +[+] Do you want to load an older session? [Y/n]: n +[+] Creating ne´,cxzw temporary session on 03/08/2018 +[+] Enter the desired session name: +ETF[etf/aircommunicator/]::> config aplauncher +ETF[etf/aircommunicator/airhost/aplauncher]::> setconf ssid CatchMe +ssid = CatchMe +ETF[etf/aircommunicator/airhost/aplauncher]::> setconf catch_all_honeypot true +catch_all_honeypot = true +ETF[etf/aircommunicator/airhost/aplauncher]::> start airhost +[+] Killing already started processes and restarting network services +[+] Stopping dnsmasq and hostapd services +[+] Access Point stopped... +[+] Running airhost plugins pre_start +[+] Starting hostapd background process +[+] Starting dnsmasq service +[+] Running airhost plugins post_start +[+] Access Point launched successfully +[+] Starting dnsmasq service +``` + +### Conclusions and future work + +These scenarios use common and well-known attacks to help validate the ETF's capabilities for testing WiFi networks and clients. The results also validate that the framework's architecture enables new attack vectors and features to be developed on top of it while taking advantage of the platform's existing capabilities. This should accelerate development of new WiFi penetration-testing tools, since a lot of the code is already written. Furthermore, the fact that complementary WiFi technologies are all integrated in a single tool will make WiFi pen-testing simpler and more efficient. + +The ETF's goal is not to replace existing tools but to complement them and offer a broader choice to security auditors when conducting WiFi pen-testing and improving user awareness. + +The ETF is an open source project [available on GitHub][14] and community contributions to its development are welcomed. Following are some of the ways you can help. + +One of the limitations of current WiFi pen-testing is the inability to log important events during tests. This makes reporting identified vulnerabilities both more difficult and less accurate. The framework could implement a logger that can be accessed by every class to create a pen-testing session report. + +The ETF tool's capabilities cover many aspects of WiFi pen-testing. On one hand, it facilitates the phases of WiFi reconnaissance, vulnerability discovery, and attack. On the other hand, it doesn't offer a feature that facilitates the reporting phase. Adding the concept of a session and a session reporting feature, such as the logging of important events during a session, would greatly increase the value of the tool for real pen-testing scenarios. + +Another valuable contribution would be extending the framework to facilitate WiFi fuzzing. The IEEE 802.11 protocol is very complex, and considering there are multiple implementations of it, both on the client and access point side, it's safe to assume these implementations contain bugs and even security flaws. These bugs could be discovered by fuzzing IEEE 802.11 protocol frames. Since Scapy allows custom packet creation and injection, a fuzzer can be implemented through it. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/evil-twin-framework + +作者:[André Esser][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/andreesser +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Rogue_access_point +[2]: https://www.python.org/ +[3]: https://scapy.net +[4]: /file/417776 +[5]: https://opensource.com/sites/default/files/uploads/pic1.png (Evil-Twin Framework Architecture) +[6]: https://www.metasploit.com +[7]: /file/417781 +[8]: https://opensource.com/sites/default/files/uploads/pic2.png (Scenario for capturing a WPA handshake after a de-authentication attack) +[9]: https://en.wikipedia.org/wiki/Address_Resolution_Protocol +[10]: /file/417786 +[11]: https://opensource.com/sites/default/files/uploads/pic3.png (Scenario for capturing a WPA handshake after a de-authentication attack) +[12]: /file/417791 +[13]: https://opensource.com/sites/default/files/uploads/pic4.png (Scenario for capturing a WPA handshake after a de-authentication attack) +[14]: https://github.com/Esser420/EvilTwinFramework From d7137e469a0dfba9cf469203f390e751cdd9fab0 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 16:01:06 +0800 Subject: [PATCH 156/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190115=20Gettin?= =?UTF-8?q?g=20started=20with=20Sandstorm,=20an=20open=20source=20web=20ap?= =?UTF-8?q?p=20platform=20sources/tech/20190115=20Getting=20started=20with?= =?UTF-8?q?=20Sandstorm,=20an=20open=20source=20web=20app=20platform.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dstorm, an open source web app platform.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sources/tech/20190115 Getting started with Sandstorm, an open source web app platform.md diff --git a/sources/tech/20190115 Getting started with Sandstorm, an open source web app platform.md b/sources/tech/20190115 Getting started with Sandstorm, an open source web app platform.md new file mode 100644 index 0000000000..4b88a648f7 --- /dev/null +++ b/sources/tech/20190115 Getting started with Sandstorm, an open source web app platform.md @@ -0,0 +1,58 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with Sandstorm, an open source web app platform) +[#]: via: (https://opensource.com/article/19/1/productivity-tool-sandstorm) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney (Kevin Sonney)) + +Getting started with Sandstorm, an open source web app platform +====== +Learn about Sandstorm, the third in our series on open source tools that will make you more productive in 2019. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sand_dunes_desert_hills_landscape_nature.jpg?itok=wUByylBb) + +There seems to be a mad rush at the beginning of every year to find ways to be more productive. New Year's resolutions, the itch to start the year off right, and of course, an "out with the old, in with the new" attitude all contribute to this. And the usual round of recommendations is heavily biased towards closed source and proprietary software. It doesn't have to be that way. + +Here's the third of my picks for 19 new (or new-to-you) open source tools to help you be more productive in 2019. + +### Sandstorm + +Being productive isn't just about to-do lists and keeping things organized. Often it requires a suite of tools linked to make a workflow go smoothly. + +![](https://opensource.com/sites/default/files/uploads/sandstorm_1.png) + +[Sandstorm][1] is an open source collection of packaged apps, all accessible from a single web interface and managed from a central console. You can host it yourself or use the [Sandstorm Oasis][2] service—for a per-user fee. + +![](https://opensource.com/sites/default/files/uploads/sandstorm_2.png) + +Sandstorm has a marketplace that makes it simple to install the apps that are available. It includes apps for productivity, finance, note taking, task tracking, chat, games, and a whole lot more. You can also package your own apps and upload them by following the application-packaging guidelines in the [developer documentation][3]. + +![](https://opensource.com/sites/default/files/uploads/sandstorm_3.png) + +Once installed, a user can create [grains][4]—basically containerized instances of app data. Grains are private by default and can be shared with other Sandstorm users. This means they are secure by default, and users can chose what to share with others. + +![](https://opensource.com/sites/default/files/uploads/sandstorm_4.png) + +Sandstorm can authenticate from several different external sources as well as use a "passwordless" email-based authentication. Using an external service means you don't have to manage yet another set of credentials if you already use one of the supported services. + +In the end, Sandstorm makes installing and using supported collaborative apps quick, easy, and secure. + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/productivity-tool-sandstorm + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney (Kevin Sonney) +[b]: https://github.com/lujun9972 +[1]: https://sandstorm.io/ +[2]: https://oasis.sandstorm.io +[3]: https://docs.sandstorm.io/en/latest/developing/ +[4]: https://sandstorm.io/how-it-works From 36ea275158f6146e63256dc9602d651fd16ad8d9 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 16:02:36 +0800 Subject: [PATCH 157/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190115=20What?= =?UTF-8?q?=20happens=20when=20a=20veteran=20teacher=20goes=20to=20an=20op?= =?UTF-8?q?en=20source=20conference=20sources/talk/20190115=20What=20happe?= =?UTF-8?q?ns=20when=20a=20veteran=20teacher=20goes=20to=20an=20open=20sou?= =?UTF-8?q?rce=20conference.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...acher goes to an open source conference.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md diff --git a/sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md b/sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md new file mode 100644 index 0000000000..e16505c36c --- /dev/null +++ b/sources/talk/20190115 What happens when a veteran teacher goes to an open source conference.md @@ -0,0 +1,68 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What happens when a veteran teacher goes to an open source conference) +[#]: via: (https://opensource.com/open-organization/19/1/educator-at-open-source-conference) +[#]: author: (Ben Owens https://opensource.com/users/engineerteacher) + +What happens when a veteran teacher goes to an open source conference +====== +Sometimes feeling like a fish out of water is precisely what educators need. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesgen_rh_032x_0.png?itok=cApG9aB4) + +"Change is going to be continual, and today is the slowest day society will ever move."—[Tony Fadell][1] + +If ever there was an experience that brought the above quotation home for me, it was my experience at the [All Things Open conference][2] in Raleigh, NC last October. Thousands of people from all over the world attended the conference, and many (if not most), worked as open source coders and developers. As one of the relatively few educators in attendance, I saw and heard things that were completely foreign to me—terms like as Istio, Stack Overflow, Ubuntu, Sidecar, HyperLedger, and Kubernetes tossed around for days. + +I felt like a fish out of water. But in the end, that was the perfect dose of reality I needed to truly understand how open principles can reshape our approach to education. + +### Not-so-strange attractors + +All Things Open attracted me to Raleigh for two reasons, both of which have to do with how our schools must do a better job of creating environments that truly prepare students for a rapidly changing world. + +The first is my belief that schools should embrace the ideals of the [open source way][3]. The second is that educators have to periodically force themselves out of their relatively isolated worlds of "doing school" in order to get a glimpse of what the world is actually doing. + +When I was an engineer for 20 years, I developed a deep sense of the power of an open exchange of ideas, of collaboration, and of the need for rapid prototyping of innovations. Although we didn't call these ideas "open source" at the time, my colleagues and I constantly worked together to identify and solve problems using tools such as [Design Thinking][4] so that our businesses remained competitive and met market demands. When I became a science and math teacher at a small [public school][5] in rural Appalachia, my goal was to adapt these ideas to my classrooms and to the school at large as a way to blur the lines between a traditional school environment and what routinely happens in the "real world." + +Through several years of hard work and many iterations, my fellow teachers and I were eventually able to develop a comprehensive, school-wide project-based learning model, where students worked in collaborative teams on projects that [made real connections][6] between required curriculum and community-based applications. Doing so gave these students the ability to develop skills they can use for a lifetime, rather than just on the next test—skills such as problem solving, critical thinking, oral and written communication, perseverance through setbacks, and adapting to changing conditions, as well as how to have routine conversations with adult mentors form the community. Only after reading [The Open Organization][7] did I realize that what we had been doing essentially embodied what Jim Whitehurst had described. In our case, of course, we applied open principles to an educational context (that model, called Open Way Learning, is the subject of a [book][8] published in December). + +I felt like a fish out of water. But in the end, that was the perfect dose of reality I needed to truly understand how open principles can reshape our approach to education. + +As good as this model is in terms of pushing students into a relevant, engaging, and often unpredictable learning environments, it can only go so far if we, as educators who facilitate this type of project-based learning, do not constantly stay abreast of changing technologies and their respective lexicon. Even this unconventional but proven approach will still leave students ill-prepared for a global, innovation economy if we aren't constantly pushing ourselves into areas outside our own comfort zones. My experience at the All Things Open conference was a perfect example. While humbling, it also forced me to confront what I didn't know so that I can learn from it to help the work I do with other teachers and schools. + +### A critical decision + +I made this point to others when I shared a picture of the All Things Open job board with dozens of colleagues all over the country. I shared it with the caption: "What did you do in your school today to prepare your students for this reality tomorrow?" The honest answer from many was, unfortunately, "not much." That has to change. + +![](https://opensource.com/sites/default/files/images/open-org/owens_1.jpg) +![](https://opensource.com/sites/default/files/images/open-org/owens_2.jpg) +(Images courtesy of Ben Owens, CC BY-SA) + +People in organizations everywhere have to make a critical decision: either embrace the rapid pace of change that is a fact of life in our world or face the hard reality of irrelevance. Our systems in education are at this same crossroads—even ones who think of themselves as being innovative. It involves admitting to students, "I don't know, but I'm willing to learn." That's the kind of teaching and learning experience our students deserve. + +It can happen, but it will take pioneering educators who are willing to move away from comfortable, back-of-the-book answers to help students as they work on difficult and messy challenges. You may very well be a veritable fish out of water. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/19/1/educator-at-open-source-conference + +作者:[Ben Owens][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/engineerteacher +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Tony_Fadell +[2]: https://allthingsopen.org/ +[3]: https://opensource.com/open-source-way +[4]: https://dschool.stanford.edu/resources-collections/a-virtual-crash-course-in-design-thinking +[5]: https://www.tricountyearlycollege.org/ +[6]: https://www.bie.org/about/what_pbl +[7]: https://www.redhat.com/en/explore/the-open-organization-book +[8]: https://www.amazon.com/Open-Up-Education-Learning-Transform/dp/1475842007/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=&sr= From b7e9f2c0150af57e5cc97909668416b24b8d8419 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 16:05:57 +0800 Subject: [PATCH 158/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190104=20Take?= =?UTF-8?q?=20to=20the=20virtual=20skies=20with=20FlightGear=20sources/tec?= =?UTF-8?q?h/20190104=20Take=20to=20the=20virtual=20skies=20with=20FlightG?= =?UTF-8?q?ear.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ke to the virtual skies with FlightGear.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20190104 Take to the virtual skies with FlightGear.md diff --git a/sources/tech/20190104 Take to the virtual skies with FlightGear.md b/sources/tech/20190104 Take to the virtual skies with FlightGear.md new file mode 100644 index 0000000000..c3793e4128 --- /dev/null +++ b/sources/tech/20190104 Take to the virtual skies with FlightGear.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Take to the virtual skies with FlightGear) +[#]: via: (https://opensource.com/article/19/1/flightgear) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +Take to the virtual skies with FlightGear +====== +Dreaming of piloting a plane? Try open source flight simulator FlightGear. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/flightgear_cockpit_plane_sky.jpg?itok=LRy0lpOS) + +If you've ever dreamed of piloting a plane, you'll love [FlightGear][1]. It's a full-featured, [open source][2] flight simulator that runs on Linux, MacOS, and Windows. + +The FlightGear project began in 1996 due to dissatisfaction with commercial flight simulation programs, which were not scalable. Its goal was to create a sophisticated, robust, extensible, and open flight simulator framework for use in academia and pilot training or by anyone who wants to play with a flight simulation scenario. + +### Getting started + +FlightGear's hardware requirements are fairly modest, including an accelerated 3D video card that supports OpenGL for smooth framerates. It runs well on my Linux laptop with an i5 processor and only 4GB of RAM. Its documentation includes an [online manual][3]; a [wiki][4] with portals for [users][5] and [developers][6]; and extensive tutorials (such as one for its default aircraft, the [Cessna 172p][7]) to teach you how to operate it. + +It's easy to install on both [Fedora][8] and [Ubuntu][9] Linux. Fedora users can consult the [Fedora installation page][10] to get FlightGear running. + +On Ubuntu 18.04, I had to install a repository: + +``` +$ sudo add-apt-repository ppa:saiarcot895/flightgear +$ sudo apt-get update +$ sudo apt-get install flightgear +``` + +Once the installation finished, I launched it from the GUI, but you can also launch the application from a terminal by entering: + +``` +$ fgfs +``` + +### Configuring FlightGear + +The menu on the left side of the application window provides configuration options. + +![](https://opensource.com/sites/default/files/uploads/flightgear_menu.png) + +**Summary** returns you to the application's home screen. + +**Aircraft** shows the aircraft you have installed and offers the option to install up to 539 other aircraft available in FlightGear's default "hangar." I installed a Cessna 150L, a Piper J-3 Cub, and a Bombardier CRJ-700. Some of the aircraft (including the CRJ-700) have tutorials to teach you how to fly a commercial jet; I found the tutorials informative and accurate. + +![](https://opensource.com/sites/default/files/uploads/flightgear_aircraft.png) + +To select an aircraft to pilot, highlight it and click on **Fly!** at the bottom of the menu. I chose the default Cessna 172p and found the cockpit depiction extremely accurate. + +![](https://opensource.com/sites/default/files/uploads/flightgear_cockpit-view.png) + +The default airport is Honolulu, but you can change it in the **Location** menu by providing your favorite airport's [ICAO airport code][11] identifier. I found some small, local, non-towered airports like Olean and Dunkirk, New York, as well as larger airports including Buffalo, O'Hare, and Raleigh—and could even choose a specific runway. + +Under **Environment** , you can adjust the time of day, the season, and the weather. The simulation includes advance weather modeling and the ability to download current weather from [NOAA][12]. + +**Settings** provides an option to start the simulation in Paused mode by default. Also in Settings, you can select multi-player mode, which allows you to "fly" with other players on FlightGear supporters' global network of servers that allow for multiple users. You must have a moderately fast internet connection to support this functionality. + +The **Add-ons** menu allows you to download aircraft and additional scenery. + +### Take flight + +To "fly" my Cessna, I used a Logitech joystick that worked well. You can calibrate your joystick using an option in the **File** menu at the top. + +Overall, I found the simulation very accurate and think the graphics are great. Try FlightGear yourself — I think you will find it a very fun and complete simulation package. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/flightgear + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: http://home.flightgear.org/ +[2]: http://wiki.flightgear.org/GNU_General_Public_License +[3]: http://flightgear.sourceforge.net/getstart-en/getstart-en.html +[4]: http://wiki.flightgear.org/FlightGear_Wiki +[5]: http://wiki.flightgear.org/Portal:User +[6]: http://wiki.flightgear.org/Portal:Developer +[7]: http://wiki.flightgear.org/Cessna_172P +[8]: http://rpmfind.net/linux/rpm2html/search.php?query=flightgear +[9]: https://launchpad.net/~saiarcot895/+archive/ubuntu/flightgear +[10]: https://apps.fedoraproject.org/packages/FlightGear/ +[11]: https://en.wikipedia.org/wiki/ICAO_airport_code +[12]: https://www.noaa.gov/ From 248544db327a0eb78fe0df6e1ace711e1516711d Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 16:08:59 +0800 Subject: [PATCH 159/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190104=20Midori?= =?UTF-8?q?:=20A=20Lightweight=20Open=20Source=20Web=20Browser=20sources/t?= =?UTF-8?q?ech/20190104=20Midori-=20A=20Lightweight=20Open=20Source=20Web?= =?UTF-8?q?=20Browser.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...- A Lightweight Open Source Web Browser.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20190104 Midori- A Lightweight Open Source Web Browser.md diff --git a/sources/tech/20190104 Midori- A Lightweight Open Source Web Browser.md b/sources/tech/20190104 Midori- A Lightweight Open Source Web Browser.md new file mode 100644 index 0000000000..a2e31daf6c --- /dev/null +++ b/sources/tech/20190104 Midori- A Lightweight Open Source Web Browser.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Midori: A Lightweight Open Source Web Browser) +[#]: via: (https://itsfoss.com/midori-browser) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Midori: A Lightweight Open Source Web Browser +====== + +**Here’s a quick review of the lightweight, fast, open source web browser Midori, which has returned from the dead.** + +If you are looking for a lightweight [alternative web browser][1], try Midori. + +[Midori][2] is an open source web browser that focuses more on being lightweight than on providing a ton of features. + +If you have never heard of Midori, you might think that it is a new application but Midori was first released in 2007. + +Because it focused on speed, Midori soon gathered a niche following and became the default browser in lightweight Linux distributions like Bodhi Linux, SilTaz etc. + +Other distributions like [elementary OS][3] also used Midori as its default browser. But the development of Midori stalled around 2016 and its fans started wondering if Midori was dead already. elementary OS dropped it from its latest release, I believe, for this reason. + +The good news is that Midori is not dead. After almost two years of inactivity, the development resumed in the last quarter of 2018. A few extensions including an ad-blocker were added in the later releases. + +### Features of Midori web browser + +![Midori web browser][4] + +Here are some of the main features of the Midori browser + + * Written in Vala with GTK+3 and WebKit rendering engine. + * Tabs, windows and session management + * Speed dial + * Saves tab for the next session by default + * Uses DuckDuckGo as a default search engine. It can be changed to Google or Yahoo. + * Bookmark management + * Customizable and extensible interface + * Extension modules can be written in C and Vala + * Supports HTML5 + * An extremely limited set of extensions include an ad-blocker, colorful tabs etc. No third-party extensions. + * Form history + * Private browsing + * Available for Linux and Windows + + + +Trivia: Midori is a Japanese word that means green. The Midori developer is not Japanese if you were guessing something along that line. + +### Experiencing Midori + +![Midori web browser in Ubuntu 18.04][5] + +I have been using Midori for the past few days. The experience is mostly fine. It supports HTML5 and renders the websites quickly. The ad-blocker is okay. The browsing experience is more or less smooth as you would expect in any standard web browser. + +The lack of extensions has always been a weak point of Midori so I am not going to talk about that. + +What I did notice is that it doesn’t support international languages. I couldn’t find a way to add new language support. It could not render the Hindi fonts at all and I am guessing it’s the same with many other non-[Romance languages][6]. + +I also had my fair share of troubles with YouTube videos. Some videos would throw playback error while others would run just fine. + +Midori didn’t eat my RAM like Chrome so that’s a big plus here. + +If you want to try out Midori, let’s see how can you get your hands on it. + +### Install Midori on Linux + +Midori is no longer available in the Ubuntu 18.04 repository. However, the newer versions of Midori can be easily installed using the [Snap packages][7]. + +If you are using Ubuntu, you can find Midori (Snap version) in the Software Center and install it from there. + +![Midori browser is available in Ubuntu Software Center][8]Midori browser is available in Ubuntu Software Center + +For other Linux distributions, make sure that you have [Snap support enabled][9] and then you can install Midori using the command below: + +``` +sudo snap install midori +``` + +You always have the option to compile from the source code. You can download the source code of Midori from its website. + +If you like Midori and want to help this open source project, please donate to them or [buy Midori merchandise from their shop][10]. + +Do you use Midori or have you ever tried it? How’s your experience with it? What other web browser do you prefer to use? Please share your views in the comment section below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/midori-browser + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/open-source-browsers-linux/ +[2]: https://www.midori-browser.org/ +[3]: https://itsfoss.com/elementary-os-juno-features/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/Midori-web-browser.jpeg?resize=800%2C450&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/midori-browser-linux.jpeg?resize=800%2C491&ssl=1 +[6]: https://en.wikipedia.org/wiki/Romance_languages +[7]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/midori-ubuntu-software-center.jpeg?ssl=1 +[9]: https://itsfoss.com/install-snap-linux/ +[10]: https://www.midori-browser.org/shop +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/Midori-web-browser.jpeg?fit=800%2C450&ssl=1 From 180b88a01072d7e45202c6e727339335ee127259 Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 16:11:31 +0800 Subject: [PATCH 160/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020190103=20How=20?= =?UTF-8?q?to=20use=20Magit=20to=20manage=20Git=20projects=20sources/tech/?= =?UTF-8?q?20190103=20How=20to=20use=20Magit=20to=20manage=20Git=20project?= =?UTF-8?q?s.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...How to use Magit to manage Git projects.md | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sources/tech/20190103 How to use Magit to manage Git projects.md diff --git a/sources/tech/20190103 How to use Magit to manage Git projects.md b/sources/tech/20190103 How to use Magit to manage Git projects.md new file mode 100644 index 0000000000..dbcb63d736 --- /dev/null +++ b/sources/tech/20190103 How to use Magit to manage Git projects.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to use Magit to manage Git projects) +[#]: via: (https://opensource.com/article/19/1/how-use-magit) +[#]: author: (Sachin Patil https://opensource.com/users/psachin) + +How to use Magit to manage Git projects +====== +Emacs' Magit extension makes it easy to get started with Git version control. +![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesk12_rh_021x_0.png?itok=fvorN0e-) + +[Git][1] is an excellent [version control][2] tool for managing projects, but it can be hard for novices to learn. It's difficult to work from the Git command line unless you're familiar with the flags and options and the appropriate situations to use them. This can be discouraging and cause people to be stuck with very limited usage. + +Fortunately, most of today's integrated development environments (IDEs) include Git extensions that make using it a lot easier. One such Git extension available in Emacs is called [Magit][3]. + +The Magit project has been around for 10 years and defines itself as "a Git porcelain inside Emacs." In other words, it's an interface where every action can be managed by pressing a key. This article walks you through the Magit interface and explains how to use it to manage a Git project. + +If you haven't already, [install Emacs][4], then [install Magit][5] before you continue with this tutorial. + +### Magit's interface + +Start by visiting a project directory in Emacs' [Dired mode][6]. For example, all my Emacs configurations are stored in the **~/.emacs.d/** directory, which is managed by Git. + +![](https://opensource.com/sites/default/files/uploads/visiting_a_git_project.png) + +If you were working from the command line, you would enter **git status** to find a project's current status. Magit has a similar function: **magit-status**. You can call this function using **M-x magit-status** (short for the keystroke **Alt+x magit-status** ). Your result will look something like this: + +![](https://opensource.com/sites/default/files/uploads/magit_status.png) + +Magit shows much more information than you would get from the **git status** command. It shows a list of untracked files, files that aren't staged, and staged files. It also shows the stash list and the most recent commits—all in a single window. + +If you want to know what has changed, use the Tab key. For example, if I move my cursor over the unstaged file **custom_functions.org** and press the Tab key, Magit will display the changes: + +![](https://opensource.com/sites/default/files/uploads/show_unstaged_content.png) + +This is similar to using the command **git diff custom_functions.org**. Staging a file is even easier. Simply move the cursor over a file and press the **s** key. The file will be quickly moved to the staged file list: + +![](https://opensource.com/sites/default/files/uploads/staging_a_file.png) + +To unstage a file, use the **u** key. It is quicker and more fun to use **s** and **u** instead of entering **git add -u ** and **git reset HEAD ** on the command line. + +### Commit changes + +In the same Magit window, pressing the **c** key will display a commit window that provides flags like **\--all** to stage all files or **\--signoff** to add a signoff line to a commit message. + +![](https://opensource.com/sites/default/files/uploads/magit_commit_popup.png) + +Move your cursor to the line where you want to enable a signoff flag and press Enter. This will highlight the **\--signoff** text, which indicates that the flag is enabled. + +![](https://opensource.com/sites/default/files/uploads/magit_signoff_commit.png) + +Pressing **c** again will display the window to write the commit message. + +![](https://opensource.com/sites/default/files/uploads/magit_commit_message.png) + +Finally, use **C-c C-c **(short form of the keys Ctrl+cc) to commit the changes. + +![](https://opensource.com/sites/default/files/uploads/magit_commit_message_2.png) + +### Push changes + +Once the changes are committed, the commit line will appear in the **Recent commits** section. + +![](https://opensource.com/sites/default/files/uploads/magit_commit_log.png) + +Place the cursor on that commit and press **p** to push the changes. + +I've uploaded a [demonstration][7] on YouTube if you want to get a feel for using Magit. I have just scratched the surface in this article. It has many cool features to help you with Git branches, rebasing, and more. You can find [documentation, support, and more][8] linked from Magit's homepage. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/how-use-magit + +作者:[Sachin Patil][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/psachin +[b]: https://github.com/lujun9972 +[1]: https://git-scm.com +[2]: https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control +[3]: https://magit.vc +[4]: https://www.gnu.org/software/emacs/download.html +[5]: https://magit.vc/manual/magit/Installing-from-Melpa.html#Installing-from-Melpa +[6]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired-Enter.html#Dired-Enter +[7]: https://youtu.be/Vvw75Pqp7Mc +[8]: https://magit.vc/ From f131af334417056b593e64209caeb5343dbbd4be Mon Sep 17 00:00:00 2001 From: darksun Date: Sat, 2 Feb 2019 16:15:14 +0800 Subject: [PATCH 161/164] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020181224=20Go=20o?= =?UTF-8?q?n=20an=20adventure=20in=20your=20Linux=20terminal=20sources/tec?= =?UTF-8?q?h/20181224=20Go=20on=20an=20adventure=20in=20your=20Linux=20ter?= =?UTF-8?q?minal.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... on an adventure in your Linux terminal.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sources/tech/20181224 Go on an adventure in your Linux terminal.md diff --git a/sources/tech/20181224 Go on an adventure in your Linux terminal.md b/sources/tech/20181224 Go on an adventure in your Linux terminal.md new file mode 100644 index 0000000000..f1b46340bb --- /dev/null +++ b/sources/tech/20181224 Go on an adventure in your Linux terminal.md @@ -0,0 +1,54 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Go on an adventure in your Linux terminal) +[#]: via: (https://opensource.com/article/18/12/linux-toy-adventure) +[#]: author: (Jason Baker https://opensource.com/users/jason-baker) + +Go on an adventure in your Linux terminal +====== + +Our final day of the Linux command-line toys advent calendar ends with the beginning of a grand adventure. + +![](https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/linux-toy-advent.png?itok=OImUJJI5) + +Today is the final day of our 24-day-long Linux command-line toys advent calendar. Hopefully, you've been following along, but if not, start back at [the beginning][1] and work your way through. You'll find plenty of games, diversions, and oddities for your Linux terminal. + +And while you may have seen some toys from our calendar before, we hope there’s at least one new thing for everyone. + +Today's toy was suggested by Opensource.com moderator [Joshua Allen Holm][2]: + +"If the last day of your advent calendar is not ESR's [Eric S. Raymond's] [open source release of Adventure][3], which retains use of the classic 'advent' command (Adventure in the BSD Games package uses 'adventure), I will be very, very, very disappointed. ;-)" + +What a perfect way to end our series. + +Colossal Cave Adventure (often just called Adventure), is a text-based game from the 1970s that gave rise to the entire adventure game genre. Despite its age, Adventure is still an easy way to lose hours as you explore a fantasy world, much like a Dungeons and Dragons dungeon master might lead you through an imaginary place. + +Rather than take you through the history of Adventure here, I encourage you to go read Joshua's [history of the game][4] itself and why it was resurrected and re-ported a few years ago. Then, go [clone the source][5] and follow the [installation instructions][6] to launch the game with **advent** **** on your system. Or, as Joshua mentions, another version of the game can be obtained from the **bsd-games** package, which is probably available from your default repositories in your distribution of choice. + +Do you have a favorite command-line toy that you we should have included? Our series concludes today, but we'd still love to feature some cool command-line toys in the new year. Let me know in the comments below, and I'll check it out. And let me know what you thought of today's amusement. + +Be sure to check out yesterday's toy, [The Linux command line can fetch fun from afar][7], and I'll see you next year! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/12/linux-toy-adventure + +作者:[Jason Baker][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jason-baker +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/article/18/12/linux-toy-boxes +[2]: https://opensource.com/users/holmja +[3]: https://gitlab.com/esr/open-adventure (https://gitlab.com/esr/open-adventure) +[4]: https://opensource.com/article/17/6/revisit-colossal-cave-adventure-open-adventure +[5]: https://gitlab.com/esr/open-adventure +[6]: https://gitlab.com/esr/open-adventure/blob/master/INSTALL.adoc +[7]: https://opensource.com/article/18/12/linux-toy-remote From 860dca821e58e10afe44eba1de279948e44d074d Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Sat, 2 Feb 2019 20:26:50 +0800 Subject: [PATCH 162/164] Translated --- ... Way To Manage Disk Partitions In Linux.md | 166 ++++++++---------- 1 file changed, 70 insertions(+), 96 deletions(-) rename {sources => translated}/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md (63%) diff --git a/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md b/translated/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md similarity index 63% rename from sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md rename to translated/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md index 85a7dfb885..a165dbbdd0 100644 --- a/sources/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md +++ b/translated/tech/20190128 fdisk - Easy Way To Manage Disk Partitions In Linux.md @@ -7,70 +7,49 @@ [#]: via: (https://www.2daygeek.com/linux-fdisk-command-to-manage-disk-partitions/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -fdisk – Easy Way To Manage Disk Partitions In Linux +fdisk – Linux 下管理磁盘分区的利器 ====== -Hard disks can be divided into one or more logical disks called partitions. +一块硬盘可以被划分成一个或多个逻辑磁盘,我们将其称作分区。我们对硬盘进行的划分信息被储存于建立在扇区 0 的分区表(MBR 或 GPT)中。 -This division is described in the partition table (MBR or GPT) found in sector 0 of the disk. +Linux 需要至少一个分区来当作 root 文件系统,所以我们不能在没有分区的情况下安装 Linux 系统。当我们创建一个分区时,我们必须将它格式化为一个适合的文件系统,否则我们就没办法往里面储存文件了。 -Linux needs at least one partition, namely for its root file system and we can’t install Linux OS without partitions. +要在 Linux 中完成分区的相关工作,我们需要一些工具。Linux 下有很多可用的相关工具,我们曾介绍过 **[Parted 命令][1]**。不过,今天我们的主角是 fdisk。 -Once created, a partition must be formatted with an appropriate file system before files can be written to it. +人人都喜欢用 fdisk,它是 Linux 下管理磁盘分区的最佳利器之一。它可以操作最大 `2TB` 的分区。大量 Linux 管理员都喜欢使用这个工具,因为当下 LVM 和 SAN 的原因,并没有多少人会用到 2TB 以上的分区。并且这个工具被世界上许多的基础设施所使用。如果你还是想创建比 2TB 更大的分区,请使用 **Parted 命令** 或 **cfdisk 命令**。 -To do so, we need some utility to perform this in Linux. +对磁盘进行分区和创建文件系统是 Linux 管理员的日常。如果你在许多不同的环境中工作,你一定每天都会重复几次这项操作。 -There are many utilities are available for that in Linux. We had written about **[Parted Command][1]** in the past and today we are going to discuss about fdisk. +### Linux 内核是如何理解硬盘的? -fdisk command is one of the the best tool to manage disk partitions in Linux. +作为人类,我们可以很轻松地理解一些事情;但是电脑就不是这样了,它们需要合适的命名交流才能理解事情。 -It supports maximum `2 TB`, and everyone prefer to go with fdisk. +在 Linux 中,外围设备都位于 `/dev` 挂载点,内核以一下的方式理解硬盘: -This tool is used by vast of Linux admin because we don’t use more than 2TB now a days due to LVM and SAN. It’s used in most of the infra structure around the world. + * **`/dev/hdX[a-z]:`** IDE 硬盘被命名为 hdX + * **`/dev/sdX[a-z]:`** SCSI 硬盘被命名为 sdX + * **`/dev/xdX[a-z]:`** XT 硬盘被命名为 xdX + * **`/dev/vdX[a-z]:`** 虚拟硬盘被命名为 vdX + * **`/dev/fdN:`** 软盘被命名为 fdN + * **`/dev/scdN or /dev/srN:`** CD-ROM 被命名为 /dev/scdN 或 /dev/srN -Still if you want to create a large partitions, like more than 2TB then you have to go either **Parted Command** or **cfdisk Command**. +### 什么是 fdisk 命令? -Disk partition and file system creations is one of the routine task for Linux admin. +fdisk 的意思是 固定的磁盘Fixed Disk格式化磁盘Format Disk,它是命令行下允许用户对分区进行查看、创建、调整大小、删除、移动和复制的工具。它支持 MBR、Sun、SGI、BSD 分区表,但是它不支持 GUID 分区表(GPT)。它不是为操作大分区设计的。 -If you are working on vast environment then you have to perform this task multiple times in a day. +fdisk 允许我们在每块硬盘上创建最多四个主分区。它们中的其中一个可以作为扩展分区,并下设多个逻辑分区。1-4 扇区作为主分区被保留,逻辑分区从扇区 5 开始。 -### How Linux Kernel Understand Hard Disks? +![磁盘分区结构图][3] -As a human we can easily understand things but computer needs the proper naming conversion to understand each and everything. +### 如何在 Linux 下安装 fdisk? -In Linux, devices are located on `/dev` partition and Kernel understand the hard disk in the following format. +fdisk 作为核心组件内置于 Linux 中,所以你不必手动安装它。 - * **`/dev/hdX[a-z]:`** IDE Disk is named hdX in Linux - * **`/dev/sdX[a-z]:`** SCSI Disk is named sdX in Linux - * **`/dev/xdX[a-z]:`** XT Disk is named sdX in Linux - * **`/dev/vdX[a-z]:`** Virtual Hard Disk is named vdX in Linux - * **`/dev/fdN:`** Floppy Drive is named fdN in Linux - * **`/dev/scdN or /dev/srN:`** CD-ROM is named /dev/scdN or /dev/srN in Linux +### 如何用 fdisk 列出可用磁盘? +在执行操作之前,我们必须知道的是哪些磁盘被加入了系统。要想列出所有可用的磁盘,请执行下文的命令。这个命令将会列出磁盘名称、分区数量、分区表类型、磁盘识别代号、分区 ID 和分区类型。 - -### What Is fdisk Command? - -fdisk stands for fixed disk or format disk is a cli utility that allow users to perform following actions on disks. It allows us to view, create, resize, delete, move and copy the partitions. - -It understands MBR, Sun, SGI and BSD partition tables and it doesn’t understand GUID Partition Table (GPT) and it is not designed for large partitions. - -fdisk allows us to create a maximum of four primary partitions per disk. One of these may be an extended partition and it holds multiple logical partitions. - -1-4 is reserved for four primary partitions and Logical partitions start numbering from 5. -![][3] - -### How To Install fdisk On Linux - -You don’t need to install fdisk in Linux system because it has installed by default as part of core utility. - -### How To List Available Disks Using fdisk Command - -First we have to know what are the disks were added in the system before performing any action. To list all available disks on your system run the following command. - -It lists possible information about the disks such as disk name, how many partitions are created in it, Disk Size, Disklabel type, Disk Identifier, Partition ID and Partition Type. - -``` +```shell $ sudo fdisk -l Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes @@ -107,11 +86,11 @@ Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes ``` -### How To List A Specific Disk Partitions Using fdisk Command +### 如何使用 fdisk 列出特定分区信息? -If you would like to see a specific disk and it’s partitions, use the following format. +如果你希望查看指定分区的信息,请使用以下命令: -``` +```shell $ sudo fdisk -l /dev/sda Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors Units: sectors of 1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 512 = 512 bytes @@ -124,11 +103,11 @@ Device Boot Start End Sectors Size Id Type /dev/sda1 core.md Dict.md lctt2014.md lctt2016.md lctt2018.md LICENSE published README.md scripts sources translated 20973568 62914559 41940992 20G 83 Linux ``` -### How To List Available Actions For fdisk Command +### 如何列出 fdisk 所有的可用操作? -When you hit `m` in the fdisk command that will show you available actions for fdisk command. +在 fdisk 中敲击 `m`,它便会列出所有可用操作: -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -177,11 +156,11 @@ Help: s create a new empty Sun partition table ``` -### How To List Partitions Types Using fdisk Command +### 如何使用 fdisk 列出分区类型? -When you hit `l` in the fdisk command that will show you an available partitions type for fdisk command. +在 fdisk 中敲击 `l`,它便会列出所有可用分区的类型: -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -219,16 +198,13 @@ Command (m for help): l 1c Hidden W95 FAT3 75 PC/IX bc Acronis FAT32 L fe LANstep 1e Hidden W95 FAT1 80 Old Minix be Solaris boot ff BBT ``` +### 如何使用 fdisk 创建一个磁盘分区? -### How To Create A Disk Partition Using fdisk Command +如果你希望新建磁盘分区,请参考下面的步骤。比如我希望在 `/dev/sdc` 中新建四个分区(三个主分区和一个扩展分区),只需要执行下文的命令。 -If you would like to create a new partition use the following steps. In my case, i'm going to create 4 partitions (3 Primary and 1 Extended) on `/dev/sdc` disk. To the same for other partitions too. +首先,请在操作 “First sector” 的时候先按下 `Enter`,然后在 “Last sector” 中输入你希望创建分区的大小(可以在数字后面加 KB、MB、G 和 TB)。例如,你希望为这个分区扩容 1GB,就应该在 “Last sector” 中输入 `+1G`。当你创建三个分区之后,fdisk 默认会将分区类型设为扩展分区,如果你希望创建第四个主分区,请输入 `p` 来替代它的默认值 `e`。 -As this takes value from partition table so, hit `Enter` for first sector. Enter the size which you want to set for the partition (We can add a partition size using KB,MB,G and TB) for last sector. - -For example, if you would like to add 1GB partition then the last sector value should be `+1G`. Once you have created 3 partitions, it will automatically change the partition type to extended as a default. If you still want to create a fourth primary partitions then hit `p` instead of default value `e`. - -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -266,11 +242,11 @@ Calling ioctl() to re-read partition table. Syncing disks. ``` -### How To Create A Extended Disk Partition Using fdisk Command +### 如何使用 fdisk 创建扩展分区? -Make a note, you have to use remaining all space when you create a extended partition because again you can able to create multiple logical partition in that. +请注意,创建扩展分区时,你应该使用剩下的所有空间,以便之后在扩展分区下创建逻辑分区。 -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -311,13 +287,13 @@ Calling ioctl() to re-read partition table. Syncing disks. ``` -### How To View Unpartitioned Disk Space Using fdisk Command +### 如何用 fdisk 查看未分配空间? -As described in the above section, we have totally created 4 partitions (3 Primary and 1 Extended). Extended partition disk space will show unpartitioned until you create a logical partitions in that. +上文中,我们总共创建了四个分区(三个主分区和一个扩展分区)。在创建逻辑分区之前,扩展分区的容量将会以未分配空间显示。 -Use the following command to view the unpartitioned space for a disk. As per the below output we have `7GB` unpartitioned disk. +使用以下命令来显示磁盘上的未分配空间,下面的示例中显示的是 7GB: -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -336,12 +312,11 @@ Sector size (logical/physical): 512 bytes / 512 bytes Command (m for help): q ``` -### How To Create A Logical Partition Using fdisk Command +### 如何使用 fdisk 创建逻辑分区? -Follow the same above procedure to create a logical partition once you have created the extended partition. -Here, i have created `1GB` of logical partition called `/dev/sdc5`, you can double confirm this by checking the partition table value. +创建扩展分区后,请按照之前的步骤创建逻辑分区。在这里,我创建了位于 `/dev/sdc5` 的 `1GB` 逻辑分区。你可以查看分区表值来确认这点。 -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -377,13 +352,13 @@ Calling ioctl() to re-read partition table. Syncing disks. ``` -### How To Delete A Partition Using fdisk Command +### 如何使用 fdisk 命令删除分区? -If the partition is no more used in the system than we can remove it by using the below steps. +如果我们不再使用某个分区,请按照下面的步骤删除它。 -Make sure you have to enter the correct partition number to delete it. In this case, i'm going to remove `/dev/sdc2` partition. +请确保你输入了正确的分区号。在这里,我准备删除 `/dev/sdc2` 分区: -``` +```shell $ sudo fdisk /dev/sdc Welcome to fdisk (util-linux 2.30.1). @@ -416,13 +391,13 @@ Calling ioctl() to re-read partition table. Syncing disks. ``` -### How To Format A Partition Or Create A FileSystem On The Partition +### 如何在 Linux 下格式化分区或建立文件系统? -In computing, a file system or filesystem controls how data is stored and retrieved through inode tables. +在计算时,文件系统控制了数据的储存方式,并通过 索引节点Inode Tables 来检索数据。如果没有文件系统,操作系统是无法找到信息储存的位置的。 -Without a file system, the system can't find where the information is stored on the partition. Filesystem can be created in three ways. Here, i'm going to create a filesystem on `/dev/sdc1` partition. +在此,我准备在 `/dev/sdc1` 上创建分区。有三种方式创建文件系统: -``` +```shell $ sudo mkfs.ext4 /dev/sdc1 or $ sudo mkfs -t ext4 /dev/sdc1 @@ -441,34 +416,32 @@ Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done ``` -When you creating a filesystem on tha partition that will create the following important things on it. +当你在分区上建立文件系统时,以下重要信息会同时被创建: - * **`Filesystem UUID:`** UUID stands for Universally Unique Identifier, UUIDs are used to identify block devices in Linux. It's 128 bit long numbers represented by 32 hexadecimal digits. - * **`Superblock:`** Superblock stores metadata of the file system. If the superblock of a file system is corrupted, then the filesystem cannot be mounted and thus files cannot be accessed. - * **`Inode:`** An inode is a data structure on a filesystem on a Unix-like operating system that stores all the information about a file except its name and its actual data. - * **`Journal:`** A journaling filesystem is a filesystem that maintains a special file called a journal that is used to repair any inconsistencies that occur as the result of an improper shutdown of a computer. + * **`Filesystem UUID:`** UUID 代表了通用且独一无二的识别符,UUID 在 Linux 中通常用来识别设备。它 128 位长的数字代表了 32 个十六进制数。 + * **`Superblock:`** Superblock 储存了文件系统的元数据。如果某个文件系统的 Superblock 被破坏,我们就无法挂载它了(也就是说无法访问其中的文件了)。 + * **`Inode:`** Inode 是类 Unix 系统中文件系统的数据结构,它储存了所有除名称以外的文件信息和数据。 + * **`Journal:`** 日志式文件系统包含了用来修复电脑意外关机产生下错误信息的日志(Journal)。 -### How To Mount A Partition In Linux +### 如何在 Linux 中挂载分区? -Once you have created the partition and filesystem then we need to mount the partition to use. +在你创建完分区和文件系统之后,我们需要挂载它们以便使用。我们需要创建一个挂载点来挂载分区,使用 mkdir 来创建一个挂载点。 -To do so, we need to create a mountpoint to mount the partition. Use mkdir command to create a mountpoint. - -``` +```shell $ sudo mkdir -p /mnt/2g-new ``` -For temporary mount, use the following command. You will be lose this mountpoint after rebooting your system. +如果你希望进行临时挂载,请使用下面的命令。在计算机重启之后,你会丢失这个挂载点。 -``` +```shell $ sudo mount /dev/sdc1 /mnt/2g-new ``` -For permanent mount, add the partition details in the fstab file. It can be done in two ways either adding device name or UUID value. +如果你希望永久挂载某个分区,请将分区详情加入 fstab 文件。我们既可以输入设备名称,也可以输入 UUID。 -Permanent mount using Device Name: +使用设备名称来进行永久挂载: ``` # vi /etc/fstab @@ -477,6 +450,7 @@ Permanent mount using Device Name: ``` Permanent mount using UUID Value. To get a UUID of the partition use blkid command. +使用 UUID 来进行永久挂载(请使用 blkid 来获取 UUID): ``` $ sudo blkid @@ -490,7 +464,7 @@ $ sudo blkid UUID=d17e3c31-e2c9-4f11-809c-94a549bc43b7 /mnt/2g-new ext4 defaults 0 0 ``` -The same has been verified using df Command. +使用 df 命令亦可: ``` $ df -h @@ -512,7 +486,7 @@ via: https://www.2daygeek.com/linux-fdisk-command-to-manage-disk-partitions/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[zhs852](https://github.com/zhs852) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6bf9ed046a2b9a18776e8ccdfd46b21fb1b15b69 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 2 Feb 2019 20:34:56 +0800 Subject: [PATCH 163/164] PRF:20190124 Understanding Angle Brackets in Bash.md @HankChow --- ...24 Understanding Angle Brackets in Bash.md | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/translated/tech/20190124 Understanding Angle Brackets in Bash.md b/translated/tech/20190124 Understanding Angle Brackets in Bash.md index 7e2ed95182..1ac6b79db7 100644 --- a/translated/tech/20190124 Understanding Angle Brackets in Bash.md +++ b/translated/tech/20190124 Understanding Angle Brackets in Bash.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Understanding Angle Brackets in Bash) @@ -10,9 +10,11 @@ 理解 Bash 中的尖括号 ====== +> 为初学者介绍尖括号。 + ![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/architecture-1839450_1920.jpg?itok=ra6XonD3) -[Bash][1] 内置了很多诸如 `ls`、`cd`、`mv` 这样的重要的命令,也有很多诸如 `grep`、`awk`、`sed` 这些有用的工具。但除此之外,其实 [Bash][1] 中还有很多可以[起到胶水作用][2]的标点符号,例如点号(`.`)、逗号(`,`)、括号(`<>`)、引号(`"`)之类。下面我们就来看一下可以用来进行数据转换和转移的尖括号()。 +[Bash][1] 内置了很多诸如 `ls`、`cd`、`mv` 这样的重要的命令,也有很多诸如 `grep`、`awk`、`sed` 这些有用的工具。但除此之外,其实 [Bash][1] 中还有很多可以[起到胶水作用][2]的标点符号,例如点号(`.`)、逗号(`,`)、括号(`<>`)、引号(`"`)之类。下面我们就来看一下可以用来进行数据转换和转移的尖括号(`<>`)。 ### 转移数据 @@ -24,7 +26,7 @@ ls > dir_content.txt ``` -在上面的例子中,`>` 符号让 shell 将 `ls` 命令的输出结果写入到 `dir_content.txt` 里,而不是直接显示在命令行中。需要注意的是,如果 `dir_content.txt` 这个文件不存在,Bash 会为你创建出来;但是如果 `dir_content.txt` 是一个已有得非空文件,它的内容就会被覆盖掉。所以执行类似的操作之前务必谨慎。 +在上面的例子中,`>` 符号让 shell 将 `ls` 命令的输出结果写入到 `dir_content.txt` 里,而不是直接显示在命令行中。需要注意的是,如果 `dir_content.txt` 这个文件不存在,Bash 会为你创建;但是如果 `dir_content.txt` 是一个已有的非空文件,它的内容就会被覆盖掉。所以执行类似的操作之前务必谨慎。 你也可以不使用 `>` 而使用 `>>`,这样就可以把新的数据追加到文件的末端而不会覆盖掉文件中已有的数据了。例如: @@ -32,7 +34,7 @@ ls > dir_content.txt ls $HOME > dir_content.txt; wc -l dir_content.txt >> dir_content.txt ``` -在这串命令里,首先将 home 目录的内容写入到 `dir_content.txt` 文件中,然后使用 `wc -l` 计算出 `dir_content.txt` 文件的行数(也就是 home 目录中的文件数)并追加到 `dir_content.txt` 的末尾。 +在这串命令里,首先将家目录的内容写入到 `dir_content.txt` 文件中,然后使用 `wc -l` 计算出 `dir_content.txt` 文件的行数(也就是家目录中的文件数)并追加到 `dir_content.txt` 的末尾。 在我的机器上执行上述命令之后,`dir_content.txt` 的内容会是以下这样: @@ -57,7 +59,8 @@ Videos 17 dir_content.txt ``` -你可以将 `>` 和 `>>` 作为箭头来理解。当然,这个箭头的指向也可以反过来。例如,Coen brothers 的一些演员以及他们出演电影的次数保存在 `CBActors` 文件中,就像这样: +你可以将 `>` 和 `>>` 作为箭头来理解。当然,这个箭头的指向也可以反过来。例如,Coen brothers +(LCTT 译注:科恩兄弟,一个美国电影导演组合)的一些演员以及他们出演电影的次数保存在 `CBActors` 文件中,就像这样: ``` John Goodman 5 @@ -84,7 +87,7 @@ Steve Buscemi 5 Tony Shalhoub 3 ``` -就可以使用 [`sort`][4] 命令将这个列表按照字母顺序输出。但是,`sort` 命令本来就可以接受传入一个文件,因此在这里使用 `<` 会略显多余,直接执行 `sort CBActors` 就可以得到期望的结果。 +就可以使用 [sort][4] 命令将这个列表按照字母顺序输出。但是,`sort` 命令本来就可以接受传入一个文件,因此在这里使用 `<` 会略显多余,直接执行 `sort CBActors` 就可以得到期望的结果。 如果你想知道 Coens 最喜欢的演员是谁,你可以这样操作。首先: @@ -103,8 +106,8 @@ while read name surname films;\ 下面来分析一下这些命令做了什么: - * [`while ...; do ... done`][5] 是一个循环结构。当 `while` 后面的条件成立时,`do` 和 `done` 之间的部分会一直重复执行; - * [`read`][6] 语句会按行读入内容。`read` 会从标准输入中持续读入,直到没有内容可读入; + * [while ...; do ... done][5] 是一个循环结构。当 `while` 后面的条件成立时,`do` 和 `done` 之间的部分会一直重复执行; + * [read][6] 语句会按行读入内容。`read` 会从标准输入中持续读入,直到没有内容可读入; * `CBActors` 文件的内容会通过 `<` 从标准输入中读入,因此 `while` 循环会将 `CBActors` 文件逐行完整读入; * `read` 命令可以按照空格将每一行内容划分为三个字段,然后分别将这三个字段赋值给 `name`、`surname` 和 `films` 三个变量,这样就可以很方便地通过 `echo $films $name $surname >> filmsfirst;\` 来重新排列几个字段的放置顺序并存放到 `filmfirst` 文件里面了。 @@ -136,7 +139,7 @@ via: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash 作者:[Paul Brown][a] 选题:[lujun9972][b] 译者:[HankChow](https://github.com/HankChow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a45ca7058de92b3cf419789277a2175e68399eb0 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 2 Feb 2019 20:35:50 +0800 Subject: [PATCH 164/164] PUB:20190124 Understanding Angle Brackets in Bash.md @HankChow https://linux.cn/article-10502-1.html --- .../20190124 Understanding Angle Brackets in Bash.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190124 Understanding Angle Brackets in Bash.md (98%) diff --git a/translated/tech/20190124 Understanding Angle Brackets in Bash.md b/published/20190124 Understanding Angle Brackets in Bash.md similarity index 98% rename from translated/tech/20190124 Understanding Angle Brackets in Bash.md rename to published/20190124 Understanding Angle Brackets in Bash.md index 1ac6b79db7..1c8f4ffe7c 100644 --- a/translated/tech/20190124 Understanding Angle Brackets in Bash.md +++ b/published/20190124 Understanding Angle Brackets in Bash.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-10502-1.html) [#]: subject: (Understanding Angle Brackets in Bash) [#]: via: (https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash) [#]: author: (Paul Brown https://www.linux.com/users/bro66)