From b5cdd0f700912e6847441cacdbc05fd84771193f Mon Sep 17 00:00:00 2001 From: Scott Griffin Date: Tue, 23 Jun 2015 23:00:16 -0700 Subject: [PATCH 01/59] brace expansion example. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0b7ef27..b484543 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ Notes: - In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: `${name:?error message}`. For example, if a Bash script requires a single argument, just write `input_file=${1:?usage: $0 input_file}`. Arithmetic expansion: `i=$(( (i + 1) % 5 ))`. Sequences: `{1..10}`. Trimming of strings: `${var%suffix}` and `${var#prefix}`. For example if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`. +- Shell brace expansion can help reduce having to re-type similar text. The command `echo foo{,bar,baz}` will expand to +`echo foo foobar foobaz`. This is helpful when copying/renaming files such as `cp somefile{,.bak}` which expands to +`cp somefile somefile.bak` or `mv some_{,absurdly_long_}filename` which expands to `mv some_filename some_absurdly_long_filename` + - The output of a command can be treated like a file via `<(some command)`. For example, compare local `/etc/hosts` with a remote one: ```sh diff /etc/hosts <(ssh somehost cat /etc/hosts) From 24c17d60743316fc4d7453139cedca2443030b3e Mon Sep 17 00:00:00 2001 From: Marcel Steinbeck Date: Sat, 27 Jun 2015 09:30:34 +0200 Subject: [PATCH 02/59] added apg, closes #101 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8d9563f..ae0c127 100644 --- a/README.md +++ b/README.md @@ -433,6 +433,8 @@ A few examples of piecing together commands: - `fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful" +- `apg`: generates several random passwords. + ## More resources From 809940da7fbb14dda7eb6d8a6782995276d3135c Mon Sep 17 00:00:00 2001 From: grossws Date: Thu, 9 Jul 2015 12:27:45 +0300 Subject: [PATCH 03/59] Add more binary viewers/editors --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 327bdf6..7e7b306 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ Notes: - The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. -- For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. +- For binary files, use `hd`, `hexdump` or `xxd` for simple hex dumps and `bvi` or `biew` for binary editing. - Also for binary files, `strings` (plus `grep`, etc.) lets you find bits of text. @@ -372,7 +372,7 @@ A few examples of piecing together commands: - `pv`: monitor the progress of data through a pipe -- `hd` and `bvi`: dump or edit binary files +- `hd`, `hexdump`, `xxd`, `biew` and `bvi`: dump or edit binary files - `strings`: extract text from binary files From 8e29e5fc0c7802a76c253e273317213ef228301b Mon Sep 17 00:00:00 2001 From: Dmytro Danylevskyi Date: Fri, 10 Jul 2015 07:33:43 +0300 Subject: [PATCH 04/59] Add shyaml --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7d06371..549b87e 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,8 @@ Notes: - For JSON, use `jq`. +- For Yaml, use `shyaml`. + - For Excel or CSV files, [csvkit](https://github.com/onyxfish/csvkit) provides `in2csv`, `csvcut`, `csvjoin`, `csvgrep`, etc. - For Amazon S3, [`s3cmd`](https://github.com/s3tools/s3cmd) is convenient and [`s4cmd`](https://github.com/bloomreach/s4cmd) is faster. Amazon's [`aws`](https://github.com/aws/aws-cli) is essential for other AWS-related tasks. From 3a26b207565c0452f2d953555f2dd600d529a240 Mon Sep 17 00:00:00 2001 From: Ivgeni Segal Date: Tue, 14 Jul 2015 11:35:46 -0700 Subject: [PATCH 05/59] Update README.md Added Mosh. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index af21393..79337b4 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,8 @@ Notes: - Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. A more minimal alternative for session persistence only is `dtach`. +- Use [`mosh`](https://mosh.mit.edu/) Mobile Shell to wrap your ssh sessions over a stateless UDP so that you never have to manually reconnect when on the road, or when your internet connection gets temporarilly dropped. + - In ssh, knowing how to port tunnel with `-L` or `-D` (and occasionally `-R`) is useful, e.g. to access web sites from a remote server. - It can be useful to make a few optimizations to your ssh configuration; for example, this `~/.ssh/config` contains settings to avoid dropped connections in certain network environments, uses compression (which is helpful with scp over low-bandwidth connections), and multiplex channels to the same server with a local control file: From 811078f3d0ffcb4ba2cc51861ef1e5842866e060 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sat, 25 Jul 2015 11:00:40 -0700 Subject: [PATCH 06/59] Add link to shellcheck --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2374424..cb0cb6d 100644 --- a/README.md +++ b/README.md @@ -465,6 +465,7 @@ These are items relevant *only* on MacOS. - [awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources. - [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) for writing better shell scripts. +- [shellcheck](https://github.com/koalaman/shellcheck) - A shell script static analysis tool. Essentially, lint for bash/sh/zsh. ## Disclaimer From 67ab3a8352d770e63c05a4f7fe5e9733431f541d Mon Sep 17 00:00:00 2001 From: Chunyang Xu Date: Sun, 26 Jul 2015 02:37:48 +0800 Subject: [PATCH 07/59] zh: Update README-zh.md --- README-zh.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README-zh.md b/README-zh.md index 33f5ced..422c1c6 100644 --- a/README-zh.md +++ b/README-zh.md @@ -62,7 +62,7 @@ - 学习基本的网络管理:`ip` 或 `ifconfig`,`dig`。 -- 熟悉正则表达式,以及 `grep`/`egrep` 里不同参数的作用,例如 `-i`,`-o`,`-A`,和 `-B`。 +- 熟悉正则表达式,以及 `grep`/`egrep` 里不同参数的作用,例如 `-i`,`-o`,`-v`,`-A`,`-B` 和 `-C`。 - 学会使用 `apt-get`,`yum`,`dnf` 或 `pacman` (取决于你使用的 Linux 发行版)来查找或安装包。确保你的环境中有 `pip` 来安装基于 Python 的命令行工具 (部分程序使用 `pip` 来安装会很简单)。 @@ -99,6 +99,8 @@ - 有关打开套接字和文件,请参阅 `lsof`。 +- 使用 `uptime` 或 `w` 来查看系统已经运行多长时间。 + - 使用`alias`来创建常用命令的快捷形式。例如:`alias ll='ls -latr'`使你可以方便地执行`ls -latr`命令。 - 在 Bash 脚本中,使用 `set -x` 去调试输出,尽可能的使用严格模式,使用 `set -e` 令脚本在发生错误时退出而不是继续运行,使用 `set -o pipefail` 严谨地对待错误(尽管问题可能很微妙)。当牵扯到很多脚本时,使用 `trap`。 @@ -249,7 +251,7 @@ - 了解如何运用 `gdb` 连接到一个运行着的进程并获取它的堆栈轨迹。 -- 学会使用 `/proc`。它在调试正在出现的问题的时候有时会效果惊人。比如:`/proc/cpuinfo`,`/proc/xxx/cwd`,`/proc/xxx/exe`,`/proc/xxx/fd/`,`/proc/xxx/smaps`。 +- 学会使用 `/proc`。它在调试正在出现的问题的时候有时会效果惊人。比如:`/proc/cpuinfo`,`/proc/meminfo`,`/proc/cmdline`,`/proc/xxx/cwd`,`/proc/xxx/exe`,`/proc/xxx/fd/`,`/proc/xxx/smaps`(这里的 `xxx` 表示进程的 id 或 pid)。 - 当调试一些之前出现的问题的时候,`sar` 非常有用。它展示了 cpu、内存以及网络等的历史数据。 @@ -354,6 +356,8 @@ - `stat`:文件信息 +- `time`:执行命令,并计算执行时间 + - `tac`:反向输出文件 - `shuf`:文件中随机选取几行 @@ -402,7 +406,11 @@ - [`glances`](https://github.com/nicolargo/glances):高层次的多子系统总览 -- `iostat`:CPU 和硬盘状态 +- `iostat`:硬盘使用状态 + +- `mpstat`: CPU 使用状态 + +- `vmstat`: 内存使用状态 - `htop`:top 的加强版 @@ -420,6 +428,8 @@ - `dmesg`:引导及系统错误信息 +- `sysctl`: 在内核运行时动态地查看和修改内核的运行参数 + - `hdparm`:SATA/ATA 磁盘更改及性能分析 - `lsb_release`:Linux 发行版信息 @@ -428,6 +438,8 @@ - `lshw`,`lscpu`,`lspci`,`lsusb` 和 `dmidecode`:查看硬件信息,包括 CPU、BIOS、RAID、显卡、USB设备等 +- `lsmod` 和 `modifno`:列出内核模块,并显示其细节 + - `fortune`,`ddate` 和 `sl`:额,这主要取决于你是否认为蒸汽火车和莫名其妙的名人名言是否“有用” ## 仅限 Mac 系统 From fd2bc5052262a331edaaf9463b20d6a59a2f8da6 Mon Sep 17 00:00:00 2001 From: Chunyang Xu Date: Mon, 27 Jul 2015 18:53:18 +0800 Subject: [PATCH 08/59] zh: Update translation I think "OS X" now is the official name of OS for Mac, according to https://en.wikipedia.org/wiki/OS_X --- README-zh.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README-zh.md b/README-zh.md index 422c1c6..e125835 100644 --- a/README-zh.md +++ b/README-zh.md @@ -11,7 +11,7 @@ - [系统调试](#系统调试) - [一行代码](#一行代码) - [冷门但有用](#冷门但有用) -- [仅限 Mac 系统](#仅限-mac-系统) +- [仅限 MacOS X 系统](#仅限-macos-x-系统) - [更多资源](#更多资源) - [免责声明](#免责声明) - [授权条款](#授权条款) @@ -32,7 +32,7 @@ 涵盖范围: - 这篇文章对刚接触命令行的新手以及具有命令行使用经验的人都有用处。本文致力于做到覆盖面广(尽量包括一切重要的内容),具体(给出最常见的具体的例子)以及简洁(避免一些不必要的东西以及一些偏题的可以在其他地方翻阅到文献的东西)。 每个小技巧在某个特定情境下都是基本的或能够显著地节约时间。 -- 本文为 Linux 所写,除了[仅限 Mac 系统](#仅限-mac-系统)节。其它节中的大部分内容都适用于其它 Unix 系统或 Mac 系统,甚至 Cygwin。 +- 本文为 Linux 所写,除了[仅限 MacOS X 系统](#仅限-macos-x-系统)节。其它节中的大部分内容都适用于其它 Unix 系统或 MacOS 系统,甚至 Cygwin。 - 本文关注于交互式 Bash,尽管很多技巧适用于其他 shell 或 Bash 脚本。 - 本文包括了“标准的”Unix 命令和需要安装特定包的命令,只要它们足够重要。 @@ -442,9 +442,9 @@ - `fortune`,`ddate` 和 `sl`:额,这主要取决于你是否认为蒸汽火车和莫名其妙的名人名言是否“有用” -## 仅限 Mac 系统 +## 仅限 MacOS X 系统 -以下是*仅限于* Mac 系统的技巧 +以下是*仅限于* MacOS 系统的技巧 - 用 `brew` (Homebrew)或者 `port` (MacPorts)进行包管理。这些可以用来在 Mac 系统上安装以上的大多数命令。 @@ -454,7 +454,7 @@ - Spotlight: 用 `mdfind` 搜索文件,用 `mdls` 列出元数据(例如照片的 EXIF 信息)。 -- 注意 Mac 系统是基于 BSD UNIX 的,许多命令(例如 `ps`,`ls`,`tail`,`awk`,`sed`)都和 Linux 中有些微的不同,这些极大的被 System V-style Unix 和 GNU 工具影响。你可以通过标题为 "BSD General Commands Manual" 的 man 页面发现这些不同。在有些情况下 GNU 版本的命令也可能被安装(例如 `gawk` 和 `gsed` 对应 GNU 中的 awk 和 sed )。如果要写跨平台的 Bash 脚本,避免使用这些命令(例如,考虑 Python 或者 `perl` )或者经过仔细的测试。 +- 注意 MacOS 系统是基于 BSD UNIX 的,许多命令(例如 `ps`,`ls`,`tail`,`awk`,`sed`)都和 Linux 中有些微的不同,这些极大的被 System V-style Unix 和 GNU 工具影响。你可以通过标题为 "BSD General Commands Manual" 的 man 页面发现这些不同。在有些情况下 GNU 版本的命令也可能被安装(例如 `gawk` 和 `gsed` 对应 GNU 中的 awk 和 sed )。如果要写跨平台的 Bash 脚本,避免使用这些命令(例如,考虑 Python 或者 `perl` )或者经过仔细的测试。 ## 更多资源 From fe1df2b928cf0b0c1fbbd41773f1d978fa19cd1c Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 27 Jul 2015 22:31:10 -0700 Subject: [PATCH 09/59] Add instructions for using alt key in Mac OS. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4a08170..db6471b 100644 --- a/README.md +++ b/README.md @@ -456,6 +456,8 @@ These are items relevant *only* on MacOS. - Copy output of any command to a desktop app with `pbcopy` and paste input from one with `pbpaste`. +- To use enable use of the Option key in Mac OS Terminal as an alt key (such as used in the commands above like **alt-b**, **alt-f**, etc.), open Preferences -> Profiles -> Keyboard and select "Use Option as Meta key". + - To open a file with a desktop app, use `open` or `open -a /Applications/Whatever.app`. - Spotlight: Search files with `mdfind` and list metadata (such as photo EXIF info) with `mdls`. From b0c958fb6274b5fd943e24bff2e70fd5721e0028 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 27 Jul 2015 22:52:17 -0700 Subject: [PATCH 10/59] Add coverage of watch. Thanks to ShawnMilo! Fixes #237 Fixes #241 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cc0e3d..7664dfa 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,8 @@ A few examples of piecing together commands: cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn ``` +- To continuously monitor changes, use `watch`, e.g. check changes to files in a directory with `watch -d -n 2 'ls -rtlh | tail'` or to network settings while troubleshooting your wifi settings with `watch -d -n 2 ifconfig`. + - Run this function to get a random tip from this document (parses Markdown and extracts an item): ```sh function taocl() { @@ -329,7 +331,7 @@ A few examples of piecing together commands: - `fold`: wrap lines of text -- `column`: format text into columns or tables +- `column`: format text into fixed-width columns or tables - `expand` and `unexpand`: convert between tabs and spaces @@ -361,6 +363,8 @@ A few examples of piecing together commands: - `time`: execute and time a command +- `watch`: run a command repeatedly, showing results and/or highlighting changes + - `tac`: print files in reverse - `shuf`: random selection of lines from a file From baaebeb7ff05995c731760f7152df00c00dc1a1d Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 27 Jul 2015 22:57:55 -0700 Subject: [PATCH 11/59] Slightly clarify description for column. See #240. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7664dfa..b0dc200 100644 --- a/README.md +++ b/README.md @@ -331,7 +331,7 @@ A few examples of piecing together commands: - `fold`: wrap lines of text -- `column`: format text into fixed-width columns or tables +- `column`: format text fields into aligned, fixed-width columns or tables - `expand` and `unexpand`: convert between tabs and spaces From 4a23231d86e59c4ecaf941d7083ce50fac985a45 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 29 Jul 2015 07:47:40 +0200 Subject: [PATCH 12/59] sl: update translation --- README-sl.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README-sl.md b/README-sl.md index 6c5c9e9..456924e 100644 --- a/README-sl.md +++ b/README-sl.md @@ -293,6 +293,8 @@ Nekaj primerov sestavljanja ukazov skupaj: cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn ``` +- Da neprekinjeno nadzirate spremembe, uporabite `watch`, npr. preverite spremembe datotek v direktoriju z `watch -d -n 2 'ls -rtlh | tail'` ali med odpravljanjem težav vaših nastavitev wifi z `watch -d -n 2 ifconfig`. + - Poženite to funkcijo, da dobite naključni nasvet iz tega dokumenta (razčleni Markdown in izvleče element): ```sh function taocl() { @@ -329,7 +331,7 @@ Nekaj primerov sestavljanja ukazov skupaj: - `fold`: ovije vrstice teksta -- `column`: oblikuje tekst v stolpce ali tabele +- `column`: oblikuje tekstovna polja v poravnane stolpce s fiksno širino ali tabele - `expand` in `unexpand`: pretvori med tabulatorji in presledki @@ -361,6 +363,8 @@ Nekaj primerov sestavljanja ukazov skupaj: - `time`: izvrši in da ukaz v čas +- `watch`: večkrat požene ukaz in prikazuje rezultate in/ali poudari spremembe + - `tac`: izpiše datoteke v obratnem redu - `shuf`: naključna izbira vrstic iz datoteke @@ -456,6 +460,8 @@ To so elementi pomembni *samo* za MacOS. - Kopirajte izpis katerega koli ukaza na namizno aplikacijo s `pbcopy` in prilepite vnos iz ene s `pbpaste`. +- Da omogočite uporabo topke Option v Mac OS Terminalu kot tipka alt (kot je uporabljena v ukazih zgoraj kot **alt-b**, **alt-f** itd), odprite Preferences -> Profiles -> Keyboard in izberite "Use Option as Meta key". + - Da odprete datoteko z namizno aplikacijo, uporabite `open` ali `open -a /Applications/Whatever.app`. - Spotlight: Poiščite datoteke z `mdfind` in izpišite meta podatke (kot so EXIF informacije fotografije) z `mdls`. @@ -467,7 +473,7 @@ To so elementi pomembni *samo* za MacOS. - [awesome-shell](https://github.com/alebcay/awesome-shell): urejan seznam orodij lupine in virov. - [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) za pisanje boljših skript lupine. - +- [shellcheck](https://github.com/koalaman/shellcheck) - lupinska skripta orodja statične analize. V osnovi, lint za bash/sh/zsh. ## Pogoji uporabe From f97d4359a98ee3583a70514d2d8fd331f851f89d Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 29 Jul 2015 07:52:20 +0200 Subject: [PATCH 13/59] Simplify explanaiton of the Option key on Mac OS X --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0dc200..6b98611 100644 --- a/README.md +++ b/README.md @@ -460,7 +460,7 @@ These are items relevant *only* on MacOS. - Copy output of any command to a desktop app with `pbcopy` and paste input from one with `pbpaste`. -- To use enable use of the Option key in Mac OS Terminal as an alt key (such as used in the commands above like **alt-b**, **alt-f**, etc.), open Preferences -> Profiles -> Keyboard and select "Use Option as Meta key". +- To enable the Option key in Mac OS Terminal as an alt key (such as used in the commands above like **alt-b**, **alt-f**, etc.), open Preferences -> Profiles -> Keyboard and select "Use Option as Meta key". - To open a file with a desktop app, use `open` or `open -a /Applications/Whatever.app`. From 123293a0a0288368c2b723c401071a8ae56e2c54 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Wed, 29 Jul 2015 23:35:42 -0700 Subject: [PATCH 14/59] Add iostat example. Improve langauge. Fixes #231. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b98611..f4ec7a5 100644 --- a/README.md +++ b/README.md @@ -229,9 +229,9 @@ Notes: - For web debugging, `curl` and `curl -I` are handy, or their `wget` equivalents, or the more modern [`httpie`](https://github.com/jakubroztocil/httpie). -- To know disk/cpu/network status, use `iostat`, `netstat`, `top` (or the better `htop`), and (especially) `dstat`. Good for getting a quick idea of what's happening on a system. +- To know current disk/cpu/network status, the classic tools are `iostat`, `netstat`, and `top` (or the better `htop`). Use `iostat -mxz 15` for basic CPU and detailed per-partition disk stats and performance insight. -- For a more in-depth system overview, use [`glances`](https://github.com/nicolargo/glances). It presents you with several system level statistics in one terminal window. Very helpful for quickly checking on various subsystems. +- For a quick overview of what's happening on a system, `dstat` is especially useful. For broadest overview with details, use [`glances`](https://github.com/nicolargo/glances). - To know memory status, run and understand the output of `free` and `vmstat`. In particular, be aware the "cached" value is memory held by the Linux kernel as file cache, so effectively counts toward the "free" value. From c608c225f3786d48a3487c7abc266f15488f711a Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Thu, 30 Jul 2015 00:02:44 -0700 Subject: [PATCH 15/59] Add iotop. Put netstat + ss in their own item. Fixes #78 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f4ec7a5..b398baa 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,9 @@ Notes: - For web debugging, `curl` and `curl -I` are handy, or their `wget` equivalents, or the more modern [`httpie`](https://github.com/jakubroztocil/httpie). -- To know current disk/cpu/network status, the classic tools are `iostat`, `netstat`, and `top` (or the better `htop`). Use `iostat -mxz 15` for basic CPU and detailed per-partition disk stats and performance insight. +- To know current cpu/disk status, the classic tools are `top` (or the better `htop`), `iostat`, and `iotop`. Use `iostat -mxz 15` for basic CPU and detailed per-partition disk stats and performance insight. + +- For network connection details, use `netstat` and `ss`. - For a quick overview of what's happening on a system, `dstat` is especially useful. For broadest overview with details, use [`glances`](https://github.com/nicolargo/glances). From ab3319f766f8df2496114d4d665376b3bd24e257 Mon Sep 17 00:00:00 2001 From: Xudong Zhang Date: Tue, 4 Aug 2015 10:22:04 +0800 Subject: [PATCH 16/59] Fix a typo. modifno should be modinfo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b398baa..e88677f 100644 --- a/README.md +++ b/README.md @@ -449,7 +449,7 @@ A few examples of piecing together commands: - `lshw`, `lscpu`, `lspci`, `lsusb`, `dmidecode`: hardware information, including CPU, BIOS, RAID, graphics, devices, etc. -- `lsmod` and `modifno`: List and show details of kernel modules. +- `lsmod` and `modinfo`: List and show details of kernel modules. - `fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful" From 2cf2393063996626a135821775d7e05b36e05d66 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 3 Aug 2015 21:43:03 -0700 Subject: [PATCH 17/59] More detail on ctrl-r. Fixes #52. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b398baa..12f7ff7 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Notes: ## Everyday use -- In Bash, use **Tab** to complete arguments and **ctrl-r** to search through command history. +- In Bash, use **Tab** to complete arguments and **ctrl-r** to search through command history (after pressing, type to search, press **ctrl-r** repeatedly to cycle through more matches, press **Enter** to execute the found command, or hit the right arrow to put the result in the current line to allow editing). - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete all the way back to the start of the line. Use **alt-b** and **alt-f** to move by word, **ctrl-a** to move cursor to beginning of line, **ctrl-e** to move cursor to end of line, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. From 873363937ea4ece4192be893acc5ecd7b234f115 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 4 Aug 2015 14:47:29 +0200 Subject: [PATCH 18/59] sl: update translation# --- README-sl.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README-sl.md b/README-sl.md index 456924e..c7e8b87 100644 --- a/README-sl.md +++ b/README-sl.md @@ -70,7 +70,7 @@ Opombe: ## Vsakodnevna uporaba -- V Bash-u uporabite **Tab** za dokončanje argumentov in **ctrl-r**, da iščete skozi zgodovino ukazov. +- V Bash-u uporabite **Tab** za dokončanje argumentov in **ctrl-r**, da iščete skozi zgodovino ukazov (po pritiski, vtipkajte za iskanje, pritisnite **ctrl-r** s ponavljanjem za kroženje skozi več ujemanj, pritisnite **Enter**, da izvršite najdeni ukaz, ali pritisnite desno puščico, da date trenutni rezultat v trenutno vrstico in omogočite urejanje). - V Bash-u uporabite **ctrl-w**, da izbrišete zadnjo besedo in **ctrl-u**, da izbrišete vse do začetka vrstice. Uporabite **alt-b** in **alt-f**, da se premikate po besedah, **ctrl-a**, da premaknete kurzor na začetek vrstice, **ctrl-e**, da premaknete kurzor na konec vrstice, **ctrl-k**, da ubijete do začetka vrstice, **ctrl-l**, da počistite zaslon. Glejte `man readline` za vse privzete vezave tipk v Bash-u. Na voljo jih je veliko. Na primer **alt-.** kroži skozi prejšnje argumente in **alt-*** razširi glob. @@ -229,9 +229,11 @@ Opombe: - Za spletno razhroščevanje, sta priročna `curl` in `curl -I` ali pa njun ekvivalent `wget`, ali bolj moderen [`httpie`](https://github.com/jakubroztocil/httpie). -- Da izveste status diska/procesorja/omrežja, uporabite `iostat`, `netstat`, `top` (ali bolje `htop`) in (posebno) `dstat`. Dobro za dobiti hitro idejo, kaj se dogaja na sistemu. +- Da izveste trenutni status diska/procesorja/omrežja, so na voljo klasična orodja `top`, (ali bolje `htop`), `iostat` in `iotop` . Uporabite `iostat -mxz 15` za osnovno statistiko CPU in podrobno na particijo statistiko diska in vpogled v uspešnost. -- Za hiter podrobnejši pregled sistema uporabite [`glances`](https://github.com/nicolargo/glances). Predstavi vam nekaj statistik nivoja sistema v enem oknu terminala. Zelo uporabno za hitro preverjanje na različnih podsistemih. +- Za podrobnosti omrežne povezave uporabite `netstat` in `ss`. + +- Za hiter pregled, kaj se dogaja na sistemu, je `dstat` posebno uporaben. Za širši pregled s podrobnostmi uporabite [`glances`](https://github.com/nicolargo/glances). - Da izveste status spomina, poženite in razumite izpis `free` in `vmstat`. Še posebej bodite pozorni, da je vrednost "cached" držana v spominu s strani jedra Linux-a kot datoteka predpomnilnika, tako da efektivno šteje proti vrednosti "free". From a5f64eb5f28e24bd8261598aab4ec6a945266af9 Mon Sep 17 00:00:00 2001 From: aneasystone Date: Wed, 5 Aug 2015 15:12:11 +0800 Subject: [PATCH 19/59] Use `Tab` to list available commands --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a41294..32b7045 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Notes: ## Everyday use -- In Bash, use **Tab** to complete arguments and **ctrl-r** to search through command history. +- In Bash, use **Tab** to complete arguments or list all available commands and **ctrl-r** to search through command history. - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete all the way back to the start of the line. Use **alt-b** and **alt-f** to move by word, **ctrl-a** to move cursor to beginning of line, **ctrl-e** to move cursor to end of line, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. From dfda8cd6c862af0f9b82877a0e9d9f1670a94a66 Mon Sep 17 00:00:00 2001 From: Chujie Zeng Date: Mon, 10 Aug 2015 00:09:32 +0800 Subject: [PATCH 20/59] Fix a typo --- README-zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index e125835..24a50b8 100644 --- a/README-zh.md +++ b/README-zh.md @@ -438,7 +438,7 @@ - `lshw`,`lscpu`,`lspci`,`lsusb` 和 `dmidecode`:查看硬件信息,包括 CPU、BIOS、RAID、显卡、USB设备等 -- `lsmod` 和 `modifno`:列出内核模块,并显示其细节 +- `lsmod` 和 `modinfo`:列出内核模块,并显示其细节 - `fortune`,`ddate` 和 `sl`:额,这主要取决于你是否认为蒸汽火车和莫名其妙的名人名言是否“有用” From 93746b409e839f39581f397b00422e5b76853b07 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 10 Aug 2015 20:47:10 -0700 Subject: [PATCH 21/59] Link on filenames handling. Thanks to @mator. Fixes #71. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ac3b60..10ea84e 100644 --- a/README.md +++ b/README.md @@ -475,7 +475,8 @@ These are items relevant *only* on MacOS. - [awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources. - [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) for writing better shell scripts. -- [shellcheck](https://github.com/koalaman/shellcheck) - A shell script static analysis tool. Essentially, lint for bash/sh/zsh. +- [shellcheck](https://github.com/koalaman/shellcheck): A shell script static analysis tool. Essentially, lint for bash/sh/zsh. +- [Filenames and Pathnames in Shell](http://www.dwheeler.com/essays/filenames-in-shell.html): The sadly complex minutiae on how to handle filenames correctly in shell scripts. ## Disclaimer From f7755ef0d20112be07ad289025b42b83f7067a6b Mon Sep 17 00:00:00 2001 From: Uggla Date: Tue, 11 Aug 2015 13:30:24 +0200 Subject: [PATCH 22/59] Add vimdiff and sdiff command. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10ea84e..8d0b553 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,9 @@ Notes: - If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). -- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. +- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff and `sdiff` easier to read diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. + +- Use `vimdiff` to compare and edit files. Really efficient ! - For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. From 11bbb2bb9d1412b4971b784cba59f7da54977ebd Mon Sep 17 00:00:00 2001 From: Uggla Date: Tue, 11 Aug 2015 13:54:12 +0200 Subject: [PATCH 23/59] Fix for #146. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10ea84e..5e21d46 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Notes: - Learn about redirection of output and input using `>` and `<` and pipes using `|`. Know `>` overwrites the output file and `>>` appends. Learn about stdout and stderr. -- Learn about file glob expansion with `*` (and perhaps `?` and `{`...`}`) and quoting and the difference between double `"` and single `'` quotes. (See more on variable expansion below.) +- Learn about file glob expansion with `*` (and perhaps `?` and `[`...`]`) and quoting and the difference between double `"` and single `'` quotes. (See more on variable expansion below.) - Be familiar with Bash job management: `&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill`, etc. From 4e794ecfde83b535b6871a449e34b07d89be2c60 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 11 Aug 2015 10:14:34 -0700 Subject: [PATCH 24/59] More on brace expansion. Updates #116. Thanks also to the suggestion in #1. --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 14126b9..1979b8f 100644 --- a/README.md +++ b/README.md @@ -115,9 +115,8 @@ Notes: - In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: `${name:?error message}`. For example, if a Bash script requires a single argument, just write `input_file=${1:?usage: $0 input_file}`. Arithmetic expansion: `i=$(( (i + 1) % 5 ))`. Sequences: `{1..10}`. Trimming of strings: `${var%suffix}` and `${var#prefix}`. For example if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`. -- Shell brace expansion can help reduce having to re-type similar text. The command `echo foo{,bar,baz}` will expand to -`echo foo foobar foobaz`. This is helpful when copying/renaming files such as `cp somefile{,.bak}` which expands to -`cp somefile somefile.bak` or `mv some_{,absurdly_long_}filename` which expands to `mv some_filename some_absurdly_long_filename` +- Brace expansion using `{`...`}` can reduce having to re-type similar text and automate combinations of items. This is helpful in examples like `mv foo.{txt,pdf} some-dir` (which moves both files), `cp somefile{,.bak}` (which expands to +`cp somefile somefile.bak`) or `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (which expands all possible combinations and creates a directory tree). - The output of a command can be treated like a file via `<(some command)`. For example, compare local `/etc/hosts` with a remote one: ```sh From f800f02ba004e1826005b463d6de45578d399396 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 11 Aug 2015 10:17:40 -0700 Subject: [PATCH 25/59] Edits to #259 for brevity. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 540c9a5..74cc63e 100644 --- a/README.md +++ b/README.md @@ -210,9 +210,7 @@ Notes: - If you ever need to write a tab literal in a command line in Bash (e.g. for the -t argument to sort), press **ctrl-v** **[Tab]** or write `$'\t'` (the latter is better as you can copy/paste it). -- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff and `sdiff` easier to read diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. - -- Use `vimdiff` to compare and edit files. Really efficient ! +- The standard tools for patching source code are `diff` and `patch`. See also `diffstat` for summary statistics of a diff and `sdiff` for a side-by-side diff. Note `diff -r` works for entire directories. Use `diff -r tree1 tree2 | diffstat` for a summary of changes. Use `vimdiff` to compare and edit files. - For binary files, use `hd` for simple hex dumps and `bvi` for binary editing. From 54878c375bb556feebb330ba51947becf6b4e1d7 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 11 Aug 2015 23:37:21 -0700 Subject: [PATCH 26/59] Open command in editor. Thanks to #253. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0958f9e..6b76a5b 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,10 @@ Notes: - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete all the way back to the start of the line. Use **alt-b** and **alt-f** to move by word, **ctrl-a** to move cursor to beginning of line, **ctrl-e** to move cursor to end of line, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. -- Alternatively, if you love vi-style key-bindings, use `set -o vi`. + +- Alternatively, if you love vi-style key-bindings, use `set -o vi` (and `set -o emacs` to put it back). + +- For editing long commands, after setting your editor (for example `export EDITOR=vim`), **ctrl-x** **ctrl-e** will open the current command in an editor for multi-line editing. Or in vi style, **escape-v**. - To see recent commands, `history`. There are also many abbreviations such as `!$` (last argument) and `!!` last command, though these are often easily replaced with **ctrl-r** and **alt-.**. From 5fef2d2bf64ffc9475d2bee035ab242d48e3f7c2 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 11 Aug 2015 23:46:17 -0700 Subject: [PATCH 27/59] Tweaks to #132. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 67fbf47..9b854a4 100644 --- a/README.md +++ b/README.md @@ -395,6 +395,8 @@ A few examples of piecing together commands: - `units`: unit conversions and calculations; converts furlongs per fortnight to twips per blink (see also `/usr/share/units/definitions.units`) +- `apg`: generates random passwords + - `7z`: high-ratio file compression - `ldd`: dynamic library info @@ -459,8 +461,6 @@ A few examples of piecing together commands: - `fortune`, `ddate`, and `sl`: um, well, it depends on whether you consider steam locomotives and Zippy quotations "useful" -- `apg`: generates several random passwords. - ## MacOS X only From 96cbb88ffa4dc00a6b0a9567e84d0cf802296d21 Mon Sep 17 00:00:00 2001 From: Uggla Date: Wed, 12 Aug 2015 10:33:52 +0200 Subject: [PATCH 28/59] Add byobu command. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b854a4..e1c5285 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ Notes: - Use `man ascii` for a good ASCII table, with hex and decimal values. For general encoding info, `man unicode`, `man utf-8`, and `man latin1` are helpful. -- Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. A more minimal alternative for session persistence only is `dtach`. +- Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. `byobu` can enhance screen or tmux providing more information and easier management. A more minimal alternative for session persistence only is `dtach`. - In ssh, knowing how to port tunnel with `-L` or `-D` (and occasionally `-R`) is useful, e.g. to access web sites from a remote server. From cf2b1815a63420a76818846e627909989ee9e99e Mon Sep 17 00:00:00 2001 From: Hunter-Github Date: Wed, 12 Aug 2015 13:10:16 +0300 Subject: [PATCH 29/59] A reference to dateutils Adding date-processing utilites according to [#258](https://github.com/jlevy/the-art-of-command-line/issues/258) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9b854a4..3e2baa0 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,8 @@ Notes: - To split files into pieces, see `split` (to split by size) and `csplit` (to split by a pattern). +- To manipulate date and time expressions, use `dateadd`, `datediff`, `strptime` etc. from [`dateutils`](http://www.fresse.org/dateutils). + - Use `zless`, `zmore`, `zcat`, and `zgrep` to operate on compressed files. From 579cc225291754d40d085326fcede4e945007170 Mon Sep 17 00:00:00 2001 From: aneasystone Date: Thu, 13 Aug 2015 15:15:23 +0800 Subject: [PATCH 30/59] Cover inode --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a41294..84afca5 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Notes: - Know `ssh`, and the basics of passwordless authentication, via `ssh-agent`, `ssh-add`, etc. -- Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -hs *`). For filesystem management, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. +- Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -hs *`). For filesystem management, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. In addition, learn what an inode is, use `ls -i` or `df -i` to perform a deep exploration. - Basic network management: `ip` or `ifconfig`, `dig`. From 878379f868f49ce50daaa08855d40ac51da47b2d Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 14 Aug 2015 02:59:47 +0200 Subject: [PATCH 31/59] sl: update translation --- README-sl.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README-sl.md b/README-sl.md index c7e8b87..c056705 100644 --- a/README-sl.md +++ b/README-sl.md @@ -53,7 +53,7 @@ Opombe: - Naučite se o preusmeritvi izpisa in vnosa z uporabo `>` in `<` ter uporabo cevi `|`. Vedite, da `>` prepiše izpis datoteke in `>>` ga pripne. Naučite se o stdout in stderr. -- Naučite se o razširitvi datotek glob z `*` (in mogoče `?` ter `{`...`}`) in citiranje ter razliko med dvojnim `"` in enojnim `'` citatom. (Poglejte več o razširitvi spremenljivk spodaj.) +- Naučite se o razširitvi datotek glob z `*` (in mogoče `?` ter `[`...`]`) in citiranje ter razliko med dvojnim `"` in enojnim `'` citatom. (Poglejte več o razširitvi spremenljivk spodaj.) - Seznanite se z upravljanjem nalog Bash-a: `&`, **ctrl-z**, **ctrl-c**, `jobs`, `fg`, `bg`, `kill` itd. @@ -70,11 +70,14 @@ Opombe: ## Vsakodnevna uporaba -- V Bash-u uporabite **Tab** za dokončanje argumentov in **ctrl-r**, da iščete skozi zgodovino ukazov (po pritiski, vtipkajte za iskanje, pritisnite **ctrl-r** s ponavljanjem za kroženje skozi več ujemanj, pritisnite **Enter**, da izvršite najdeni ukaz, ali pritisnite desno puščico, da date trenutni rezultat v trenutno vrstico in omogočite urejanje). +- V Bash-u uporabite **Tab** za dokončanje argumentov ali izpis vseh ukazov, ki so na voljo, in **ctrl-r**, da iščete skozi zgodovino ukazov (po pritiski, vtipkajte za iskanje, pritisnite **ctrl-r** s ponavljanjem za kroženje skozi več ujemanj, pritisnite **Enter**, da izvršite najdeni ukaz, ali pritisnite desno puščico, da date trenutni rezultat v trenutno vrstico in omogočite urejanje). - V Bash-u uporabite **ctrl-w**, da izbrišete zadnjo besedo in **ctrl-u**, da izbrišete vse do začetka vrstice. Uporabite **alt-b** in **alt-f**, da se premikate po besedah, **ctrl-a**, da premaknete kurzor na začetek vrstice, **ctrl-e**, da premaknete kurzor na konec vrstice, **ctrl-k**, da ubijete do začetka vrstice, **ctrl-l**, da počistite zaslon. Glejte `man readline` za vse privzete vezave tipk v Bash-u. Na voljo jih je veliko. Na primer **alt-.** kroži skozi prejšnje argumente in **alt-*** razširi glob. -- Alternativno, če imate radi vi-stilske vezave tipk, uporabite `set -o vi`. + +- Alternativno, če imate radi vi-stilske vezave tipk, uporabite `set -o vi` (in `set -o emacs` za povrnitev nazaj). + +- Za urejanje dolgih ukazov, po nastavitvi vašega urejevalnika (na primer `export EDITOR=vim`), **ctrl-x** **ctrl-e** bo odprlo trenutni ukaz v urejevalniku za več vrstično urejanje. Ali v stilu vi, **escape-v**. - Da vidite nedavne ukaze, `history`. Na voljo je tudi veliko okrajšav, kot je `!$` (zadnji argument) in `!!` zadnji ukaz, čeprav so te pogostokrat enostavno zamenjani s **ctrl-r** in **alt-.**. @@ -115,6 +118,9 @@ Opombe: - V Bash-u bodite pozorni, saj je veliko vrst razširjenih spremenljivk. Preverjanje, če spremenljivka obstaja: `${name:?error message}`. Na primer, če skripta Bash zahteva en argument, samo napišite `input_file=${1:?usage: $0 input_file}`. Aritmetična raširitev: `i=$(( (i + 1) % 5 ))`. Sekvence: `{1..10}`. Obrezovanje nizov: `${var%suffix}` in `${var#prefix}`. Na primer, če je `var=foo.pdf`, potem `echo ${var%.pdf}.txt` izpiše `foo.txt`. +- Lupinska razširitev zavitih oklepajev z `{`...`}` lahko pomaga zmanjšati potrebo po ponovnem vpisovanju podobnega teksta in avtomatizira kombiniranje elementov. To je v pomoč v primerih kot je `mv foo.{txt,pdf} some-dir` (ki premakne obe datoteki), `cp somefile{,.bak}` (kar razširi v +`cp somefile somefile.bak`) ali `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (kar razširi vse možne kombinacije in ustvari drevo direktorijev). + - Izpis ukaza se lahko tretira kot datoteko preko `<(some command)`. Na primer, primerjajte lokalno `/etc/hosts` z oddaljeno: ```sh diff /etc/hosts <(ssh somehost cat /etc/hosts) @@ -207,7 +213,7 @@ Opombe: - Če kadarkoli potrebujete zapisati tabulator dobesedno v ukazni vrstici v Bash-u (npr. za sortiranje argumenta -t), pritisnite **ctrl-v** **[Tab]** ali zapišite `$'\t'` (slednji je boljši, saj ga lahko kopirate in prilepite). -- Standardna orodja za popravljanje izvorne kode so `diff` in `patch`. Glejte tudi `diffstat` za povzetek statistike diff-a. Bodite pozorni, saj `diff -r` deluje za celotne direktorije. Uporabite `diff -r tree1 tree2 | diffstat` za povzetek sprememb. +- Standardna orodja za popravljanje izvorne kode so `diff` in `patch`. Glejte tudi `diffstat` za povzetek statistike diff-a in `sdiff` za diff drug ob drugem. Bodite pozorni, saj `diff -r` deluje za celotne direktorije. Uporabite `diff -r tree1 tree2 | diffstat` za povzetek sprememb. Uporabite `vimdiff` za primerjanje in urejanje datotek. - Pri binarnih datotekah uporabite `hd` za enostavne heksadecimalne izpise in `bvi` za binarno urejanje. @@ -222,6 +228,8 @@ Opombe: - Da razcepite datoteke na dele, glejte `split` (da razcepite po velikosti) in `csplit` (da razcepite po vzorcu). +- Za manipuliranje izrazov datuma in časa, uporabite `dateadd`, `datediff`, `strptime` itd. iz [`dateutils`](http://www.fresse.org/dateutils). + - Uporabite `zless`, `zmore`, `zcat` in `zgrep` za operiranje na kompresiranih datotekah. @@ -389,6 +397,8 @@ Nekaj primerov sestavljanja ukazov skupaj: - `units`: pretvorba enot in kalkulacije; pretvori furlonge (osmino milje) na štirinajst dni v dvajsetine točke na blink (glejte tudi `/usr/share/units/definitions.units`) +- `apg`: generira naključna gesla + - `7z`: kompresija datoteke visokega razmerja - `ldd`: informacije dinamične knjižnice @@ -475,7 +485,8 @@ To so elementi pomembni *samo* za MacOS. - [awesome-shell](https://github.com/alebcay/awesome-shell): urejan seznam orodij lupine in virov. - [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) za pisanje boljših skript lupine. -- [shellcheck](https://github.com/koalaman/shellcheck) - lupinska skripta orodja statične analize. V osnovi, lint za bash/sh/zsh. +- [shellcheck](https://github.com/koalaman/shellcheck): lupinska skripta orodja statične analize. V osnovi, lint za bash/sh/zsh. +- [Filenames and Pathnames in Shell](http://www.dwheeler.com/essays/filenames-in-shell.html): Na žalost kompleksne podrobnosti, kako pravilno ravnati z imeni datotek v lupinskih skriptah. ## Pogoji uporabe From 385b9b39ce10409045ad8f9b808d2ece180293c9 Mon Sep 17 00:00:00 2001 From: aneasystone Date: Sat, 15 Aug 2015 18:34:04 +0800 Subject: [PATCH 32/59] The easy way to redirect both standard output and standard error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a41294..519b8f0 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Notes: - Know about "here documents" in Bash, as in `cat <logfile 2>&1`. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add `logfile 2>&1` or `some-command &>logfile`. Often, to ensure a command does not leave an open file handle to standard input, tying it to the terminal you are in, it is also good practice to add ` Date: Mon, 17 Aug 2015 00:20:16 -0700 Subject: [PATCH 33/59] Cover set -v, set -u, and more on trap. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d7df0ca..bc5e9f8 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,11 @@ Notes: - Use `alias` to create shortcuts for commonly used commands. For example, `alias ll='ls -latr'` creates a new alias `ll`. -- In Bash scripts, use `set -x` for debugging output. Use strict modes whenever possible. Use `set -e` to abort on errors. Use `set -o pipefail` as well, to be strict about errors (though this topic is a bit subtle). For more involved scripts, also use `trap`. +- In Bash scripts, use `set -x` (or the variant `set -v`, which logs raw input, including unexpanded variables and comments) for debugging output. Use strict modes whenever possible: Use `set -e` to abort on errors and `set -o pipefail` as to abort within pipes, too (though this topic is a bit subtle). Use `set -u` to detect unset variable usages. For more involved scripts, also use `trap` on EXIT or ERR. A useful habit is to start a script like so, which will make it detect and abort on common errors and print a message: +```bash + set -euo pipefail + trap "echo 'error: Script failed: see last command above'" ERR +``` - In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory, e.g. ```bash @@ -118,7 +122,7 @@ Notes: - In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: `${name:?error message}`. For example, if a Bash script requires a single argument, just write `input_file=${1:?usage: $0 input_file}`. Arithmetic expansion: `i=$(( (i + 1) % 5 ))`. Sequences: `{1..10}`. Trimming of strings: `${var%suffix}` and `${var#prefix}`. For example if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`. -- Brace expansion using `{`...`}` can reduce having to re-type similar text and automate combinations of items. This is helpful in examples like `mv foo.{txt,pdf} some-dir` (which moves both files), `cp somefile{,.bak}` (which expands to +- Brace expansion using `{`...`}` can reduce having to re-type similar text and automate combinations of items. This is helpful in examples like `mv foo.{txt,pdf} some-dir` (which moves both files), `cp somefile{,.bak}` (which expands to `cp somefile somefile.bak`) or `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (which expands all possible combinations and creates a directory tree). - The output of a command can be treated like a file via `<(some command)`. For example, compare local `/etc/hosts` with a remote one: From eb7972cfa97f7ef54e5b7c557c0deb686482fea4 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 17 Aug 2015 00:23:22 -0700 Subject: [PATCH 34/59] Improve last commit. --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc5e9f8..2705c24 100644 --- a/README.md +++ b/README.md @@ -107,10 +107,10 @@ Notes: - Use `alias` to create shortcuts for commonly used commands. For example, `alias ll='ls -latr'` creates a new alias `ll`. -- In Bash scripts, use `set -x` (or the variant `set -v`, which logs raw input, including unexpanded variables and comments) for debugging output. Use strict modes whenever possible: Use `set -e` to abort on errors and `set -o pipefail` as to abort within pipes, too (though this topic is a bit subtle). Use `set -u` to detect unset variable usages. For more involved scripts, also use `trap` on EXIT or ERR. A useful habit is to start a script like so, which will make it detect and abort on common errors and print a message: +- In Bash scripts, use `set -x` (or the variant `set -v`, which logs raw input, including unexpanded variables and comments) for debugging output. Use strict modes unless you have a good reason not to: Use `set -e` to abort on errors (nonzero exit code). Use `set -u` to detect unset variable usages. Consider `set -o pipefail` too, to on errors within pipes, too (though read up on it more if you do, as this topic is a bit subtle). For more involved scripts, also use `trap` on EXIT or ERR. A useful habit is to start a script like this, which will make it detect and abort on common errors and print a message: ```bash set -euo pipefail - trap "echo 'error: Script failed: see last command above'" ERR + trap "echo 'error: Script failed: see failed command above'" ERR ``` - In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory, e.g. @@ -122,8 +122,7 @@ Notes: - In Bash, note there are lots of kinds of variable expansion. Checking a variable exists: `${name:?error message}`. For example, if a Bash script requires a single argument, just write `input_file=${1:?usage: $0 input_file}`. Arithmetic expansion: `i=$(( (i + 1) % 5 ))`. Sequences: `{1..10}`. Trimming of strings: `${var%suffix}` and `${var#prefix}`. For example if `var=foo.pdf`, then `echo ${var%.pdf}.txt` prints `foo.txt`. -- Brace expansion using `{`...`}` can reduce having to re-type similar text and automate combinations of items. This is helpful in examples like `mv foo.{txt,pdf} some-dir` (which moves both files), `cp somefile{,.bak}` (which expands to -`cp somefile somefile.bak`) or `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (which expands all possible combinations and creates a directory tree). +- Brace expansion using `{`...`}` can reduce having to re-type similar text and automate combinations of items. This is helpful in examples like `mv foo.{txt,pdf} some-dir` (which moves both files), `cp somefile{,.bak}` (which expands to `cp somefile somefile.bak`) or `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (which expands all possible combinations and creates a directory tree). - The output of a command can be treated like a file via `<(some command)`. For example, compare local `/etc/hosts` with a remote one: ```sh From 8c86fcfef9f396408d3538500ec4e6ddf48b8df3 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 18 Aug 2015 00:53:18 +0200 Subject: [PATCH 35/59] sl: Update translation --- README-sl.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README-sl.md b/README-sl.md index c056705..87bf63d 100644 --- a/README-sl.md +++ b/README-sl.md @@ -107,7 +107,11 @@ Opombe: - Uporabite `alias`, da ustvarite bližnjice za pogosto uporabljene ukaze. Na primer, `alias ll='ls -latr'` ustvari nov alias `ll`. -- V skriptah Bash uporabite `set -x` za razhroščevanje izpisa. Uporabite striktni način, kadarkoli je možno. Uporabite `set -e`, da prekinete na napakah. Uporabite tudi `set -o pipefail`, da ste striktni glede napak (čeprav je ta tema nekoliko subtilna). Za bolj vključene skripte uporabite tudi `trap`. +- V skriptah Bash uporabite `set -x` (ali varianto `set -v`, ki beleži dnevnik surovega izpisa, vključno z nerazširjenimi spremenljivkami in komentarji) za razhroščevanje izpisa. Uporabite striktni način razen, če imate dober razlog, da ga ne: Uporabite `set -e`, da preskočite napake (neničelna koda izhoda). Uporabite `set -u`, da zaznate uporabo nenastavljenih spremenljivk. Premislite tudi o `set -o pipefail`, da na napakah znotraj pip, (vendar preberite o tem več, če boste to uporabili, saj je ta tema nekoliko subtilna). Za bolj vključene skripte, uporabite tudi `trap` pri EXIT ali ERR. Uporabna navada je tako začeti skripto, kar bo naredilo, da lahko zazna ali prekliče na pogostih napakah in izpiše sporočilo: +```bash + set -euo pipefail + trap "echo 'error: Script failed: see failed command above'" ERR +``` - V skriptah Bash so podlupine (napisane z oklepaji) priročen način za grupiranje ukazov. Skupen primer je začasno premakniti na različen delovni direktorij, npr. ```bash @@ -118,8 +122,7 @@ Opombe: - V Bash-u bodite pozorni, saj je veliko vrst razširjenih spremenljivk. Preverjanje, če spremenljivka obstaja: `${name:?error message}`. Na primer, če skripta Bash zahteva en argument, samo napišite `input_file=${1:?usage: $0 input_file}`. Aritmetična raširitev: `i=$(( (i + 1) % 5 ))`. Sekvence: `{1..10}`. Obrezovanje nizov: `${var%suffix}` in `${var#prefix}`. Na primer, če je `var=foo.pdf`, potem `echo ${var%.pdf}.txt` izpiše `foo.txt`. -- Lupinska razširitev zavitih oklepajev z `{`...`}` lahko pomaga zmanjšati potrebo po ponovnem vpisovanju podobnega teksta in avtomatizira kombiniranje elementov. To je v pomoč v primerih kot je `mv foo.{txt,pdf} some-dir` (ki premakne obe datoteki), `cp somefile{,.bak}` (kar razširi v -`cp somefile somefile.bak`) ali `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (kar razširi vse možne kombinacije in ustvari drevo direktorijev). +- Lupinska razširitev zavitih oklepajev z `{`...`}` lahko pomaga zmanjšati potrebo po ponovnem vpisovanju podobnega teksta in avtomatizira kombiniranje elementov. To je v pomoč v primerih kot je `mv foo.{txt,pdf} some-dir` (ki premakne obe datoteki), `cp somefile{,.bak}` (kar razširi v `cp somefile somefile.bak`) ali `mkdir -p test-{a,b,c}/subtest-{1,2,3}` (kar razširi vse možne kombinacije in ustvari drevo direktorijev). - Izpis ukaza se lahko tretira kot datoteko preko `<(some command)`. Na primer, primerjajte lokalno `/etc/hosts` z oddaljeno: ```sh @@ -128,7 +131,7 @@ Opombe: - Spoznajte t.i. "here" dokumente v Bash-u, kot pri `cat <logfile 2>&1`. Pogosto zagotavlja, da ukaz ne pusti ročaja odprte datoteke za standardni vnos, kar ga veže na terminal v katerem se nahajate, je tudi dobra praksa, da dodate `logfile 2>&1` ali `some-command &>logfile`. Pogosto zagotavlja, da ukaz ne pusti ročaja odprte datoteke za standardni vnos, kar ga veže na terminal v katerem se nahajate, je tudi dobra praksa, da dodate ` Date: Sat, 29 Aug 2015 14:22:12 +0900 Subject: [PATCH 36/59] add Japanese translation --- README-ja.md | 452 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 452 insertions(+) create mode 100644 README-ja.md diff --git a/README-ja.md b/README-ja.md new file mode 100644 index 0000000..bdc35bd --- /dev/null +++ b/README-ja.md @@ -0,0 +1,452 @@ +原文のコミット [bb0c38c0899339e836c37eead4a9534b06c56662](https://github.com/jlevy/the-art-of-command-line/blob/bb0c38c0899339e836c37eead4a9534b06c56662/README.md) + +# The Art of Command Line + +[![Join the chat at https://gitter.im/jlevy/the-art-of-command-line](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jlevy/the-art-of-command-line?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +- [メタ情報](#meta) +- [基本](#basics) +- [日常的に使うもの](#everyday-use) +- [ファイルとデータの処理](#processing-files-and-data) +- [システムのデバッグ](#system-debugging) +- [ワンライナー](#one-liners) +- [目立たないが便利なもの](#obscure-but-useful) +- [さらなるリソース](#more-resources) +- [免責事項](#disclaimer) + +![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/cowsay.png) + +コマンドラインで流れるように操作ができるということは、軽く見られたり他人から理解されないスキルだとみなされることもあるでしょう。しかしそのスキルは、明らかにかすぐ分かるようかは問わず、エンジニアとしてのあなたの柔軟性や生産性を改善してくれるものです。ここでは、Linuxでコマンドラインを使う上で便利だと思ったメモやTipsの数々を挙げてみます。あるものは基礎的ですが、非常に詳しいもの、洗練されたもの、曖昧なものもあります。このページはそんなに長いものではないですが、ここに書いてあることの全てを使ったり思い出すことができれば、かなり詳しくなれるでしょう。 + +ここに書いてあることの多くは、[元々](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands)[Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know)に[書かれて](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix)いたものが多いですが、私よりももっと優れた人たちがすぐに改善案を出すことができるGithubに置くのがよいのではと思ったのです(訳注 : 原文はGithub上にあります)。間違いやもっとこうした方がよいという点があれば、イシューを登録するかプルリクエストをください!(もちろん、メタ情報の項や既存のプルリクエスト、イシューをまず確認してください) + +## メタ情報 + +対象 : + +- このガイドは、初心者向けでも経験者向きでもあります。幅広く(書いてあることは全て重要)、かつ明確で(多くのケースに対して具体的な例を付ける)、そして簡潔(他の場所で見つけられるような重要でないことや脱線したことは省く)であることをゴールにしています。各項目は、多くの場面において必須であるか、他の方法に比べて劇的に時間を節約してくれるでしょう。 +- Linux向けに書いています。多くはMacOS(あるいはCygwin)でも使えますが、全部ではありません。 +- インタラクティブなBashを使うことを想定していますが、多くの項目は他のシェルやBashのスクリプトでも使えるでしょう。 + +注意 : + +- 1ページ内に収めるために、内容には暗黙的に書かれていることがあります。ここで取りかかりを知ったりコマンドが分かれば、詳細をどこかで調べたりするくらいはできるでしょう。新しいプログラムをインストールするには、`apt-get`/`yum`/`dnf`/`pacman`/`pip`/`brew`(どれか適したもの)を使いましょう。 +- コマンドやオプション、パイプを分解して理解する手助けに、[Explainshell](http://explainshell.com/)を使おう。 + +## 基本 + +- 基本的なBashを学ぼう。実際のところ、`man bash`は結構簡単に理解できるしそんなに長くないので、これで一通りのことは分かる。それ以外のシェルもよいが、Bashは強力だし、常に使用可能であるという利点もある(自分のPCに入れてしまったと言ってzshやfishなど*だけ*を学んでしまうと、既存のサーバを触らなくてはならない時などに制約が出てしまう)。 + +- テキストエディタのどれか最低1つに習熟しよう。ターミナル内で適当にものを書くにあたって他に全く代替品がないという点で、理想的にはVim(`vi`)がよいだろう(通常はEmacsや高機能なIDEや最新のかっこいいエディタをメインに使っていたとしても)。 + +- `man`でのドキュメントの読み方を知ろう(知りたがりのために書くと、`man man`でセクション番号が分かる。例えば1は「一般的な」コマンド、5はファイルやそのお作法、8は管理についてといった具合)。`apropos`でmanページを探そう。コマンドによっては実行可能ファイルではなくBashのビルトインコマンドであることを理解し、`help`や`help -d`でヘルプが見られることを知ろう。 + +- `>`や`<`、`|`を使ったパイプによる入出力のリダイレクションを学ぼう。stdout(標準出力)とstderr(標準エラー出力)を学ぼう。 + +- `*`(または`?`や`{`...`}`)を使ったファイルグロブ展開、クォーテーション、ダブルクォート`"`とシングルクォート`'`の違いを学ぼう(詳しくはこの後の変数展開の項を参照)。 + +- `&`、**ctrl-z**、**ctrl-c**、`jobs`、`fg`、`bg`、`kill`など、Bashのジョブ管理について詳しくなろう。 + +- `ssh`について知るとともに、`ssh-agent`や`ssh-add`を使ったパスワードなしの認証の基本について理解しよう。 + +- ファイル管理について。`ls`や`ls -l`(特に、`ls -l`の各列が何を意味するか理解)、`less`、`head`、`tail`、`tail -f`(または`less +F`)、`ln`と`ln -s`(ハードリンクとソフトリンクの違いとそれぞれの利点の理解)、`chown`と`chmod`、`du`(ディスク使用量まとめを簡単に見るなら`du -sk *`)。ファイルシステム管理については、`df`、`mount`、`fdisk`、`mkfs`、`lsblk`。 + +- 基本的なネットワーク管理について。`ip`あるいは`ifconfig`、`dig`。 + +- 正規表現について詳しく知ろう。`grep`や`egrep`の色々なフラグも合わせて。`-i`、`-o`、`-A`、`-B`といったオプションは知っておいて損はない。 + +- `apt-get`、`yum`、`dnf`、`pacman`(ディストリビューションによって違う)といったコマンドでパッケージを探したりインストールする方法を学ぼう。Pythonベースのコマンドラインツールをインストールするのに、`pip`も必要だ(後に出てくるいくつかのコマンドは`pip`でインストールするのが一番簡単)。 + + +## 日常的に使うもの + +- Bashでは、引数を補完するのに**タブ**を使い、コマンド履歴から検索するのに**ctrl-r**を使う。 + +- Bashでは、最後の単語を削除するのには**ctrl-w**、行頭まで全て削除するには**ctrl-u**を使う。単語ごとに移動するには**alt-b**または**alt-f**、行末まで削除するには**ctrl-k**、画面のクリアは**ctrl-l**。Bashにおけるデフォルトのキー割り当てを全て見るには``man readline`を参照。たくさん出てくる。例えば、**alt-.**は前の引数を順番に表示し、**alt-***はグロブを展開する。 + +- vi風のキー割り当てが好きなら、`set -o vi`を実行しよう。 + +- 最近実行したコマンドを確認するなら`history`。**ctrl-r**や**alt-.**で用は足りるだろうが、`!$`(直前の引数)や`!!`(直前のコマンド)といった省略形もたくさんある。 + +- 前のワーキングディレクトリに戻るなら`cd -` + +- 途中までコマンドを入力したけれど心変わりした時は、**alt-#**を打つと行頭に`#`が挿入され、コメントとして入力される(**ctrl-a**、**#**、**enter**でも同じ)。これは後でコマンド履歴から検索できる。 + +- `xargs`(または`parallel`)を使おう。非常に強力。行ごとにいくつのアイテムを実行するか(`-L`)や、並列度(`-P`)も制御できる。正しく実行されるか定かでないなら、まず`xargs echo`してみればよい。`-I{}`も便利。例えば以下の通り。 + + ```bash + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- `pstree -p`はプロセスツリーを表示するのに便利。 + +- `pgrep`や`pkill`で、プロセス名で検索したりシグナルを送れる(`-f`も便利)。 + +- プロセスに遅れる色々なシグナルを知っておこう。例えば、プロセスをサスペンドするには`kill -STOP [pid]`を使う。全種類見るなら、`man 7 signal`。 + +- バックグラウンドプロセスをずっと実行し続けたいなら`nohup`あるいは`disown`を使おう。 + +- `netstat -lntp`や`ss -plat`で、どんなプロセスがリッスンしているか確認しよう(UDPなら`-u`を付ける)。 + +- 開かれているソケットやファイルを見るには`lsof`も参照。 + +- Bashスクリプトでは、`set -x`でデバッグ出力を出せる。可能なら厳格モードを使い、エラーが起きたら強制終了するよう`set -e`する。パイプのエラーも厳格に扱うために`set -o pipefail`も使おう(これはちょっと微妙かも)。より複雑なスクリプトなら、`trap`も使おう。 + +- Bashスクリプトでは、コマンドのグループを作るのにサブシェル(丸括弧で囲まれた部分)が便利。一時的にワーキングディレクトリを移動するというよくある例。 + +```bash + # カレントディレクトリで何か実行 + (cd /some/other/dir && other-command) + # 元のディレクトリで作業続行 +``` + +- Bashでは、たくさんの変数展開の種類があることを覚えておこう。変数が存在するかチェックするなら、`${name:?error message}`。例えば、Bashスクリプトが1つの引数を取る必要があるなら、`input_file=${1:?usage: $0 input_file}`とだけ書けばよい。算術式の展開は、`i=$(( (i + 1) % 5 ))`。シーケンスは`{1..10}`。文字列のトリミングは`${var%suffix}`と`${var#prefix}`。例えば`var=foo.pdf`の時、`echo ${var%.pdf}.txt`とすると`foo.txt`が出力に。 + +- コマンドの出力を`<(some command)`のようにしてファイルのように扱える。例えば、ローカルとリモートのの`/etc/hosts`を比較するなら以下のようになる。 + +```sh + diff /etc/hosts <(ssh somehost cat /etc/hosts) +``` + +- `cat <logfile 2>&1`で標準出力と標準エラー出力の両方をリダイレクトできる。コマンドが標準入力に対してファイルハンドルを開きっぱなしにせず、ログインしているターミナルにひもづけておくため、`; ::Any-NFC; ' < input.txt > output.txt +``` + +- ファイルを分割するなら`split`(サイズで分割)と`csplit`(パターンで分割)。 + +- 圧縮ファイルの操作は`zless`、`zmore`、`zcat`、`zgrep`。 + +## システムのデバッグ + +- Webのデバッグなら`curl`や`curl -l`が便利で、`wget`も同様、よりモダンなのは[`httpie`](https://github.com/jakubroztocil/httpie)。 + +- ディスクやCPU、ネットワークのステータスを知るには`iostat`、`netstat`、`top`(あるいは`htop`の方がよい)、(一番は)`dstat`。システムで何が起きているのか素早く知るにはよい。 + +- 更に詳しいシステムの全体像を見るには、[`glances`](https://github.com/nicolargo/glances)を使おう。ひとつのターミナル内で、いくつかのシステムレベルの統計情報を表示してくれる。複数のサブシステムを素早くチェックするのに非常に便利。 + +- メモリのステータスを知るには、`free`あるいは`vmstat`を実行し、その出力の意味を理解しよう。特に、"cached"の値はLinuxカーネルにファイルキャッシュとして保持されているメモリ量であり、"free"の値を見る際に考慮すべきであることに注意しよう。 + +- Javaのシステムのデバッグはまた違う困ったところがあるが、Oracleあるいは他のJVMにも共通しているシンプルなトリックは、`kill -3 `でフルスタックトレースとヒープの概要が標準出力あるいはログにダンプされる(世代別GCの詳細も参考程度だが含まれている)。 + +- 改良版tracerouteとして`mtr`を使ってネットワークの問題を調査しよう。 + +- ディスクがいっぱいになっている理由を調べるには、`ncdu`を使うと`du -sh *`より時間が節約できる。 + +- 帯域を使っているのがどのソケットやプロセスなのかを見つけるには、`iftop`あるいは`nethogs`を試そう。 + +- `ab`(Apacheに付属)は、Webサーバのパフォーマンスをざっくりチェックするのに便利。より複雑なテストには`siege`を試そう。 + +- より確実なネットワークのデバッグは`wireshark`、`tshark`、`ngrep`。 + +- `strace`と`ltrace`について知っておこう。プログラムの実行に失敗したりハングしたりクラッシュしたりして、その理由が分からない、あるいはパフォーマンスに関する一般的情報を知りたいなら、このツールが役立つはずだ。プロファイリングのオプション(`-c`)や起動中のプロセスにアタッチする機能(`-p`)も覚えておこう。 + +- 共有ライブラリをチェックするなら`ldd`を覚えておこう。 + +- 起動中のプロセスに`gdb`で接続し、そのスタックトレースを取る方法を知ろう。 + +- `/proc`以下のファイルを使おう。今起こっている問題をデバッグするのには素晴らしく便利だ。例えば、`/proc/cpuinfo`、`/proc/xxx/cwd`、`/proc/xxx/ece`、`/proc/xxx/fd/`、`/proc/xxx/smaps`。 + +- 過去に何か問題が起きたことの原因を探るなら、`sar`がとても便利。CPUやメモリ、ネットワークなどの過去の統計情報を見られる。 + +- さらに深いシステムとパフォーマンスの分析には、`stap` ([SystemTap](https://sourceware.org/systemtap/wiki))、[`perf`](http://en.wikipedia.org/wiki/Perf_(Linux))、 +[`sysdig`](https://github.com/draios/sysdig)。 + +- どのディストリビューションを使っているか確認しよう。多くのディストリビューションでは`lsb_release -a` + +- 何かいつもと違うおかしなこと(大抵ハードウェアかドライバ関連の問題だ)が起きていたら、`dmesg`を実行しよう。 + +## ワンライナー + +コマンドをまとめて使う例をいくつか。 + +- `sort`や`uniq`を使ってテキストファイルの共通部分、結合、差異を求める時に特に便利なのが以下のやり方。`a`と`b`はそれぞれ内容に重複のないテキストファイルとする。この方法は高速で、数GB程度までの任意のファイルサイズで動作する(`/tmp`が小さなルートパーティションにある場合は`-T`オプションをつける必要があるが、ソートはメモリ内で行われるとは限らない)。上述の`LC_ALL`と`sort`の`-u`オプションも参照のこと。 + +```sh + cat a b | sort | uniq > c # cはaとbの和集合 + cat a b | sort | uniq -d > c # cはaとbの共通部分 + cat a b b | sort | uniq -u > c # cはaとbの差異 +``` + +- コンフィグが含まれている`/sys`や`/proc`や`/etc/`のようなディレクトリ内の全てのファイルの中身全部を確認するには`grep . *`を使おう。 + +- テキストファイルの3列目を全て足し合わせるには以下で(Pythonで同じことをやるに比べて3倍速く3分の1の長さで書ける)。 + +```sh + awk '{ x += $3 } END { print x }' myfile +``` + +- ファイルツリーのサイズやデータを確認したいなら、以下は再帰的な`ls -l`と同じだが`ls -lR`より見やすい。 + +```sh + find . -type f -ls +``` + +- 事情が許すなら`xargs`や`parallel`を使おう。行あたりいくつのアイテムを実行するか(`-L`)や並列度(`-P`)は制御できるのにも注意。正しく使えているか心配な時には、xargs echoをまずやってみよう。また、`-I{}`も便利だ。以下の例をみてみよう。 + +```sh + find . -name '*.py' | xargs grep some_function + cat hosts | xargs -I{} ssh root@{} hostname +``` + +- Webサーバのログのようなテキストファイルがあり、各行には例えばURLの中に出てくる`acct_id`のような特定の値が現れるとしよう。`acct_id`が何回リクエストされているかを集計するには、 + +```sh + cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn +``` + +- このドキュメントからランダムに項目を抜き出すには以下の関数を実行しよう(Markdownをパースし、アイテムを抽出する)。 + +```sh + function taocl() { + curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | + pandoc -f markdown -t html | + xmlstarlet fo --html --dropdtd | + xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | + xmlstarlet unesc | fmt -80 + } +``` + +## 目立たないが便利なもの + +- `expr`: 算術演算、論理演算、または正規表現の評価を実行 + +- `m4`: シンプルなマクロプロセッサ + +- `yes`: 文字列をたくさん表示 + +- `cal`: いい感じのカレンダー + +- `env`: コマンドを実行(スクリプト内で重宝する) + +- `printenv`: 環境変数を表示する(デバッグやスクリプト内での使用に便利) + +- `look`: 文字列で始まる英単語(またはファイル内の行)を見つける + +- `cut `、 `paste`、 `join`: データの操作 + +- `fmt`: テキストの段落をフォーマットする + +- `pr`: テキストをページとカラムにフォーマットする + +- `fold`: テキストの行を分割 + +- `column`: テキストをカラムあるいはテーブルにフォーマット + +- `expand` と `unexpand`: タブとスペースの相互変換 + +- `nl`: 行数を表示 + +- `seq`: 数字を表示 + +- `bc`: 計算機 + +- `factor`: 整数を因数分解 + +- `gpg`: 暗号化とファイルのサイニング + +- `toe`: terminfoのエントリのテーブルを表示 + +- `nc`: ネットワークのデバッグとデータ転送 + +- `socat`: ソケットリレーとTCPポートのフォワーダ(`netcat`と同等) + +- `slurm`: ネットワークトラフィックの可視化 + +- `dd`: データをファイルあるいはデバイス間で移動 + +- `file`: ファイルの種類を特定 + +- `tree`: ディレクトリとサブディレクトリをツリーで表示。`ls`に似ているが再帰的に動く + +- `stat`: ファイルの情報 + +- `tac`: ファイルを逆から表示 + +- `shuf`: ファイルからランダムに選んだ行を表示 + +- `comm`: ソート済みファイルの行を比較 + +- `pv`: パイプ経由でデータの進行状況をモニタリング + +- `hd` および `bvi`: バイナリファイルのダンプと編集 + +- `strings`: バイナリファイルからテキストを抽出 + +- `tr`: 文字の置き換えと操作 + +- `iconv` あるいは `uconv`: 文字エンコーディングの変換 + +- `split ` と `csplit`: ファイルを分割 + +- `units`: 単位の変換と計算。2週間あたりのハロン(訳注 : 長さの単位)からまばたきごとのトゥウィップまで( `/usr/share/units/definitions.units`も参照のこと) + +- `7z`: 圧縮率の高いファイル圧縮 + +- `ldd`: 動的ライブラリの情報 + +- `nm`: オブジェクトファイルからシンボルを表示 + +- `ab`: Webサーバのベンチーマーク + +- `strace`: システムコールのデバッグ + +- `mtr`: ネットワークデバッグのためのより高機能なtraceroute + +- `cssh`: ビジュアルな並列シェル + +- `rsync`: ファイルやフォルダをSSH経由で同期 + +- `wireshark` と `tshark`: パケットキャプチャとネットワークデバッギング + +- `ngrep`: ネットワーク層のgrep + +- `host` と `dig`: DNS名前解決 + +- `lsof`:プロセスのファイルディスクリプタとソケット情報 + +- `dstat`: 便利なシステム情報 + +- [`glances`](https://github.com/nicolargo/glances): 高レベルに複数のサブシステムの概要を把握 + +- `iostat`: CPUとディスクの使用状況 + +- `htop`: topの改良版 + +- `last`: ログイン履歴 + +- `w`: 誰がログインしているか + +- `id`: ユーザやグループの情報 + +- `sar`: システム統計情報の履歴 + +- `iftop` または `nethogs`: ソケットあるいはプロセスごとのネットワーク使用量 + +- `ss`: ソケットの統計情報 + +- `dmesg`: 起動時とシステムのエラーメッセージ + +- `hdparm`: SATA/ATAディスクの操作やパフォーマンス確認 + +- `lsb_release`: Linuxディストリビューション情報 + +- `lsblk`: ブロックデバイスの一覧。ディスクとディスクパーティションのツリービュー + +- `lshw` と `lspci`: RAIDやグラフィックなどを含めたハードウェア情報 + +- `fortune`、 `ddate`、`sl`: んー、あー、これは蒸気機関車やZippyの引用句が「便利」だと思うかどうかによる + +## さらなるリソース + +- [awesome-shell](https://github.com/alebcay/awesome-shell): シェルのツールやリソースのまとめ +- よりよいシェルスクリプトを書くには[Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) + +## 免責事項 + +ごく一部の例外はありますが、コードは誰でも読めるように書かれています。力には責任が伴います。Bashで*できる*からといって、そうすべき必要があるという意味ではありません! ;) + +## ライセンス + +[![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/) + +このドキュメントは[Creative Commons Attribution-ShareAlike 4.0 International Licene](http://creativecommons.org/licenses/by-sa/4.0/)でライセンスされます。 From 57f3609cc3234bf5b7c969b7b97626417e3d3901 Mon Sep 17 00:00:00 2001 From: doublemarket Date: Sat, 29 Aug 2015 14:31:39 +0900 Subject: [PATCH 37/59] add links to other languages --- README-ja.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README-ja.md b/README-ja.md index bdc35bd..ce539c9 100644 --- a/README-ja.md +++ b/README-ja.md @@ -1,4 +1,6 @@ -原文のコミット [bb0c38c0899339e836c37eead4a9534b06c56662](https://github.com/jlevy/the-art-of-command-line/blob/bb0c38c0899339e836c37eead4a9534b06c56662/README.md) +[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] + +原文のコミット [bb0c38c0899339e836c37eead4a9534b06c56662](https://github.com/jlevy/the-art-of-command-line/blob/bb0c38c0899339e836c37eead4a9534b06c56662/README.md) # The Art of Command Line From 901c4e23bc3c97cca758ce3f8830a7ddf966c708 Mon Sep 17 00:00:00 2001 From: Kit Chan Date: Sun, 20 Sep 2015 22:54:58 -0700 Subject: [PATCH 38/59] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2705c24..ca0edd5 100644 --- a/README.md +++ b/README.md @@ -376,6 +376,10 @@ A few examples of piecing together commands: - `time`: execute and time a command +- `lockfile`: create semaphore file that can only be removed by `rm -f` + +- `logrotate`: rotate, compress and mail logs. + - `watch`: run a command repeatedly, showing results and/or highlighting changes - `tac`: print files in reverse From baa0b9c731f7138c1fcdb9fe8eec368e4f48f895 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 22 Sep 2015 19:43:04 -0700 Subject: [PATCH 39/59] Tweak language for #273. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f795f0c..9c9af7c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Notes: - Know `ssh`, and the basics of passwordless authentication, via `ssh-agent`, `ssh-add`, etc. -- Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -hs *`). For filesystem management, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. In addition, learn what an inode is, use `ls -i` or `df -i` to perform a deep exploration. +- Basic file management: `ls` and `ls -l` (in particular, learn what every column in `ls -l` means), `less`, `head`, `tail` and `tail -f` (or even better, `less +F`), `ln` and `ln -s` (learn the differences and advantages of hard versus soft links), `chown`, `chmod`, `du` (for a quick summary of disk usage: `du -hs *`). For filesystem management, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. Learn what an inode is (`ls -i` or `df -i`). - Basic network management: `ip` or `ifconfig`, `dig`. From 1d44566903252c2cf1da7b9c66d83e74061bdeb3 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 22 Sep 2015 19:46:38 -0700 Subject: [PATCH 40/59] Updates for #181. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 284c62b..7c67397 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ Notes: - For JSON, use [`jq`](http://stedolan.github.io/jq/). -- For Yaml, use `shyaml`. +- For YAML, use [`shyaml`](https://github.com/0k/shyaml). - For Excel or CSV files, [csvkit](https://github.com/onyxfish/csvkit) provides `in2csv`, `csvcut`, `csvjoin`, `csvgrep`, etc. From 9cb359aa94c74cfcd1ca77c772136ff36de01780 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 22 Sep 2015 19:51:59 -0700 Subject: [PATCH 41/59] ru: Heading typo. Fixes #168. --- README-ru.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-ru.md b/README-ru.md index 46b6401..61a28bb 100644 --- a/README-ru.md +++ b/README-ru.md @@ -12,7 +12,7 @@ - [Системный дебаггинг](#Системный-дебаггинг) - [В одну строчку](#В-одну-строчку) - [Сложно, но полезно](#Сложно-но-полезно) -- [MacOS X only](#Macos-x-only) +- [MacOS X only](#macos-x-only) - [Больше информации по теме](#Больше-информации-по-теме) - [Дисклеймер](#Дисклеймер) From bcb9b06a0c0cfaf02b110bd8bbc620c21f9e374d Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 22 Sep 2015 19:57:04 -0700 Subject: [PATCH 42/59] Updates to #205. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c67397..64f4bc6 100644 --- a/README.md +++ b/README.md @@ -137,8 +137,6 @@ Notes: - Use `screen` or [`tmux`](https://tmux.github.io/) to multiplex the screen, especially useful on remote ssh sessions and to detach and re-attach to a session. `byobu` can enhance screen or tmux providing more information and easier management. A more minimal alternative for session persistence only is `dtach`. -- Use [`mosh`](https://mosh.mit.edu/) Mobile Shell to wrap your ssh sessions over a stateless UDP so that you never have to manually reconnect when on the road, or when your internet connection gets temporarilly dropped. - - In ssh, knowing how to port tunnel with `-L` or `-D` (and occasionally `-R`) is useful, e.g. to access web sites from a remote server. - It can be useful to make a few optimizations to your ssh configuration; for example, this `~/.ssh/config` contains settings to avoid dropped connections in certain network environments, uses compression (which is helpful with scp over low-bandwidth connections), and multiplex channels to the same server with a local control file: @@ -154,6 +152,8 @@ Notes: - A few other options relevant to ssh are security sensitive and should be enabled with care, e.g. per subnet or host or in trusted networks: `StrictHostKeyChecking=no`, `ForwardAgent=yes` +- Consider [`mosh`](https://mosh.mit.edu/) an an alternative to ssh that uses UDP, avoiding dropped connections and adding convenience on the road (requires server-side setup). + - To get the permissions on a file in octal form, which is useful for system configuration but not available in `ls` and easy to bungle, use something like ```sh stat -c '%A %a %n' /etc/timezone From ac86b5e586f71ff2ff3750f56112743be31bb700 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 23 Sep 2015 12:40:35 +0200 Subject: [PATCH 43/59] sl: update Slovenian translation --- README-sl.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README-sl.md b/README-sl.md index 87bf63d..6decdb8 100644 --- a/README-sl.md +++ b/README-sl.md @@ -59,7 +59,7 @@ Opombe: - Spoznajte `ssh` in osnove avtentikacije brez gesla, preko `ssh-agent`, `ssh-add` itd. -- Osnovno upravljanje datotek: `ls` in `ls -l` (še posebej se naučite, kaj vsak stolpec v `ls -l` pomeni), `less`, `head`, `tail` in `tail -f` (ali celo boljše, `less +F`), `ln` in `ln -s` (naučite se razlike in prednosti trdih in mehkih povezav), `chown`, `chmod`, `du` (za hiter povzetek uporabe diska: `du -hs *`). Za upravljanje datotečnega sistema, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. +- Osnovno upravljanje datotek: `ls` in `ls -l` (še posebej se naučite, kaj vsak stolpec v `ls -l` pomeni), `less`, `head`, `tail` in `tail -f` (ali celo boljše, `less +F`), `ln` in `ln -s` (naučite se razlike in prednosti trdih in mehkih povezav), `chown`, `chmod`, `du` (za hiter povzetek uporabe diska: `du -hs *`). Za upravljanje datotečnega sistema, `df`, `mount`, `fdisk`, `mkfs`, `lsblk`. Naučite se, kaj je inode (`ls -i` or `df -i`). - Osnovno upravljanje omrežja: `ip` or `ifconfig`, `dig`. @@ -135,7 +135,7 @@ Opombe: - Uporabite `man ascii` za dobro tabelo ASCII s heksadecimalnimi in decimalnimi vrednostmi. Za splošne informacije enkodiranja so priročni `man unicode`, `man utf-8` in `man latin1`. -- Uporabite `screen` ali [`tmux`](https://tmux.github.io/), da muliplicirate zaslon, posebej uporabno na oddaljenih sejah ssh in da odstranite in se ponovno pripnete k seji. Bolj minimalna alternativa za samo obstojnost sej je `dtach`. +- Uporabite `screen` ali [`tmux`](https://tmux.github.io/), da muliplicirate zaslon, posebej uporabno na oddaljenih sejah ssh in da odstranite in se ponovno pripnete k seji. `byobu` lahko poveča t.i. screen ali tmux s ponujanjem več informacij in enostavnejšim upravljanjem. Bolj minimalna alternativa za samo obstojnost sej je `dtach`. - V ssh je poznavanje, kako usmeriti tunel z `-L` ali `-D` (in občasno `-R`) je uporaben, npr. za dostopanje do spletnih strani iz oddaljenega strežnika. @@ -152,6 +152,8 @@ Opombe: - Nekaj ostalih opcij relevantnih za ssh je varnostno občutljivih in bi morale biti omogočene s pazljivostjo, npr. na podomrežju ali gostitelju ali v zaupljivih omrežjih: `StrictHostKeyChecking=no`, `ForwardAgent=yes` +- Premislite o [`mosh`](https://mosh.mit.edu/) kot alternativi za ssh, ki uporablja UDP, da se izognete padlim povezavam in dodate priročnost, ko ste na poti (zahteva nastavitev strežniške strani). + - Da dobite pravice na datoteki v osmiškem zapisu, ki je uporaben za nastavitve sistema vendar ni na voljo pri `ls` in enostaven za mešanje, uporabite nekaj takega kot je ```sh stat -c '%A %a %n' /etc/timezone @@ -181,6 +183,8 @@ Opombe: - Za JSON, use [`jq`](http://stedolan.github.io/jq/). +- Za YAML, uporabite [`shyaml`]((https://github.com/0k/shyaml). + - Za Excel ali CSV datoteke, [csvkit](https://github.com/onyxfish/csvkit) ponuja `in2csv`, `csvcut`, `csvjoin`, `csvgrep` itd. - Za Amazon S3 je priročen [`s3cmd`](https://github.com/s3tools/s3cmd) in [`s4cmd`](https://github.com/bloomreach/s4cmd) je hitrejši. Amazon-ov [`aws`](https://github.com/aws/aws-cli) je bistven za druga AWS-povezana opravila. @@ -376,6 +380,10 @@ Nekaj primerov sestavljanja ukazov skupaj: - `time`: izvrši in da ukaz v čas +- `lockfile`: ustvari semaforno datoteko, ki je lahko odstranjena samo z `rm -f` + +- `logrotate`: rotiranje, kompresiranje in pošiljanje dnevnikov po e-pošti. + - `watch`: večkrat požene ukaz in prikazuje rezultate in/ali poudari spremembe - `tac`: izpiše datoteke v obratnem redu From 4b5e02023b1d4c119cf0d106658e582fe7834314 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Thu, 24 Sep 2015 14:22:12 -0700 Subject: [PATCH 44/59] Add saws. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 64f4bc6..945748b 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ Notes: - For Excel or CSV files, [csvkit](https://github.com/onyxfish/csvkit) provides `in2csv`, `csvcut`, `csvjoin`, `csvgrep`, etc. -- For Amazon S3, [`s3cmd`](https://github.com/s3tools/s3cmd) is convenient and [`s4cmd`](https://github.com/bloomreach/s4cmd) is faster. Amazon's [`aws`](https://github.com/aws/aws-cli) is essential for other AWS-related tasks. +- For Amazon S3, [`s3cmd`](https://github.com/s3tools/s3cmd) is convenient and [`s4cmd`](https://github.com/bloomreach/s4cmd) is faster. Amazon's [`aws`](https://github.com/aws/aws-cli) and the improved [`saws`](https://github.com/donnemartin/saws) are essential for other AWS-related tasks. - Know about `sort` and `uniq`, including uniq's `-u` and `-d` options -- see one-liners below. See also `comm`. From 8493487551acbbcd69ad698b2a974fc184fa3048 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Fri, 25 Sep 2015 01:50:13 +0200 Subject: [PATCH 45/59] sl: update translation --- README-sl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-sl.md b/README-sl.md index 6decdb8..6520b89 100644 --- a/README-sl.md +++ b/README-sl.md @@ -187,7 +187,7 @@ Opombe: - Za Excel ali CSV datoteke, [csvkit](https://github.com/onyxfish/csvkit) ponuja `in2csv`, `csvcut`, `csvjoin`, `csvgrep` itd. -- Za Amazon S3 je priročen [`s3cmd`](https://github.com/s3tools/s3cmd) in [`s4cmd`](https://github.com/bloomreach/s4cmd) je hitrejši. Amazon-ov [`aws`](https://github.com/aws/aws-cli) je bistven za druga AWS-povezana opravila. +- Za Amazon S3 je priročen [`s3cmd`](https://github.com/s3tools/s3cmd) in [`s4cmd`](https://github.com/bloomreach/s4cmd) je hitrejši. Amazon-ov [`aws`](https://github.com/aws/aws-cli) in izboljšan [`saws`](https://github.com/donnemartin/saws) sta bistvena za druga AWS-povezana opravila. - Naučite se o `sort` in `uniq` vključno z uniq-ovima opcijama `-u` in `-d` -- glejte spodaj sekcijo v eni vrstici. Glejte tudi `comm`. From f5b99f85f7ae3391ceff751be56153c5e5b2f1f0 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Wed, 30 Sep 2015 01:29:11 -0700 Subject: [PATCH 46/59] Track and ackowledge authors. This is my best effort at tracking roles from GitHub history, and assembling them with a new script, "ghizmo assemble-authors". Please let me know if you've been missed! --- AUTHORS.md | 87 ++++++++++++++++++++++++++++++++++++++++++ README.md | 5 ++- admin/authors-info.yml | 32 ++++++++++++++++ 3 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 AUTHORS.md create mode 100644 admin/authors-info.yml diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..9e8450f --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,87 @@ +# Authors + +This work is the result of the effort of many people around the world. +Contributors are listed in alphabetical order by GitHub id. +This file is maintained only in English. + + +* [Guo Chong (Armour)](https://github.com/Armour) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Armour), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AArmour)] — _translator (zh)_ +* [Alex Vergara Gil (BishopWolf)](https://github.com/BishopWolf) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=BishopWolf), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ABishopWolf)] — _translator (es)_ +* [Colas BROUX (ColasBroux)](https://github.com/ColasBroux) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ColasBroux), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AColasBroux)] +* [Deborah Digges (Deborah-Digges)](https://github.com/Deborah-Digges) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Deborah-Digges), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ADeborah-Digges)] +* [Vincent Wong (EaterOA)](https://github.com/EaterOA) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=EaterOA), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AEaterOA)] +* [Hunter-Github](https://github.com/Hunter-Github) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Hunter-Github), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AHunter-Github)] +* [曾楚杰 (Psycho7)](https://github.com/Psycho7) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Psycho7), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3APsycho7)] — _translator and maintainer (zh)_ +* [Rasmus Wriedt Larsen (RasmusWL)](https://github.com/RasmusWL) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=RasmusWL), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ARasmusWL)] +* [Snowcat8436 (Snowcat8436)](https://github.com/Snowcat8436) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Snowcat8436), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ASnowcat8436)] — _translator (ko)_ +* [Soham Chakraborty (SohamChakraborty)](https://github.com/SohamChakraborty) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=SohamChakraborty), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ASohamChakraborty)] +* [Fabien Dubosson (StreakyCobra)](https://github.com/StreakyCobra) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=StreakyCobra), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AStreakyCobra)] +* [Ungsik Yun (Ungsik-Yun)](https://github.com/Ungsik-Yun) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Ungsik-Yun), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AUngsik-Yun)] — _translator and maintainer (ko)_ +* [Antonio Ossa (aaossa)](https://github.com/aaossa) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=aaossa), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaaossa)] — _translator (es)_ +* [Ahmet Alp Balkan (ahmetalpbalkan)](https://github.com/ahmetalpbalkan) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ahmetalpbalkan), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aahmetalpbalkan)] +* [Semir Patel (analogue)](https://github.com/analogue) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=analogue), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aanalogue)] +* [Desmond Stonie (aneasystone)](https://github.com/aneasystone) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=aneasystone), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaneasystone)] +* [Brad Beyenhof (augmentedfourth)](https://github.com/augmentedfourth) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=augmentedfourth), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaugmentedfourth)] +* [Bryce J. (bj1)](https://github.com/bj1) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=bj1), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Abj1)] +* [Arturo Fernandez (bsnux)](https://github.com/bsnux) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=bsnux), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Absnux)] +* [Alex Cabrera (cabreraalex)](https://github.com/cabreraalex) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=cabreraalex), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acabreraalex)] +* [Carlos Mantilla (ceoaliongroo)](https://github.com/ceoaliongroo) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ceoaliongroo), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aceoaliongroo)] — _translator and maintainer (es)_ +* [Chris Kuehl (chriskuehl)](https://github.com/chriskuehl) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=chriskuehl), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Achriskuehl)] +* [Corey "See More" Richardson (cmr)](https://github.com/cmr) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=cmr), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acmr)] +* [Chris Rhodes (crr0004)](https://github.com/crr0004) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=crr0004), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acrr0004)] +* [Chelsea Voss (csvoss)](https://github.com/csvoss) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=csvoss), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acsvoss)] +* [Daniel t. (danasmera)](https://github.com/danasmera) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=danasmera), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adanasmera)] +* [Dmytro Danylevskyi (danylevskyi)](https://github.com/danylevskyi) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=danylevskyi), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adanylevskyi)] +* [Dave Loyall (daveloyall)](https://github.com/daveloyall) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=daveloyall), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adaveloyall)] +* [James Luck (delucks)](https://github.com/delucks) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=delucks), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adelucks)] +* [Dima Paloskin (dimapaloskin)](https://github.com/dimapaloskin) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=dimapaloskin), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adimapaloskin)] +* [Fazle Arefin (fazlearefin)](https://github.com/fazlearefin) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=fazlearefin), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Afazlearefin)] +* [githubashto](https://github.com/githubashto) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=githubashto), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agithubashto)] — _translator (ru)_ +* [The Gitter Badger (gitter-badger)](https://github.com/gitter-badger) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=gitter-badger), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agitter-badger)] +* [Grigory Rechistov (grigory-rechistov)](https://github.com/grigory-rechistov) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grigory-rechistov), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrigory-rechistov)] — _translator (ru)_ +* [grossws (grossws)](https://github.com/grossws) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grossws), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrossws)] +* [Beau Hastings (hastinbe)](https://github.com/hastinbe) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=hastinbe), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahastinbe)] +* [Sung Kim (hunkim)](https://github.com/hunkim) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=hunkim), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahunkim)] — _translator (ko)_ +* [Ivgeni Segal (isegal)](https://github.com/isegal) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=isegal), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aisegal)] +* [Alan Brogan (jalanb)](https://github.com/jalanb) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jalanb), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajalanb)] +* [Joshua Levy (jlevy)](https://github.com/jlevy) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jlevy), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajlevy)] — _original author and maintainer_ +* [Jesse Sightler (jsight)](https://github.com/jsight) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jsight), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajsight)] +* [Konstantin Mikhaylov (jtraub)](https://github.com/jtraub) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jtraub), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajtraub)] +* [Wael M. Nasreddine (kalbasit)](https://github.com/kalbasit) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kalbasit), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akalbasit)] +* [Colin Chan (kalgynirae)](https://github.com/kalgynirae) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kalgynirae), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akalgynirae)] +* [Michail Kargakis (kargakis)](https://github.com/kargakis) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kargakis), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akargakis)] +* [kstn (kastian)](https://github.com/kastian) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kastian), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akastian)] — _translator (ru)_ +* [Kesu J (kesu)](https://github.com/kesu) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kesu), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akesu)] +* [Konstantin Ilyashenko (kostya13)](https://github.com/kostya13) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kostya13), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akostya13)] +* [Pavel Zhukov (landgraf)](https://github.com/landgraf) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=landgraf), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Alandgraf)] +* [Matjaž Lipuš (matjaz)](https://github.com/matjaz) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=matjaz), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amatjaz)] +* [Mayra Cabrera (mayra-cabrera)](https://github.com/mayra-cabrera) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=mayra-cabrera), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amayra-cabrera)] +* [Michael Barlow (michaelbarlow7)](https://github.com/michaelbarlow7) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=michaelbarlow7), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amichaelbarlow7)] +* [Harry Moreno (morenoh149)](https://github.com/morenoh149) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=morenoh149), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amorenoh149)] +* [Nilton Vasques (niltonvasques)](https://github.com/niltonvasques) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=niltonvasques), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aniltonvasques)] — _translator and maintainer (pt)_ +* [Oleg Berman (olegberman)](https://github.com/olegberman) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=olegberman), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aolegberman)] — _translator and maintainer (ru)_ +* [osmero](https://github.com/osmero) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=osmero), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aosmero)] — _translator (ru)_ +* [Serg Petrov (p12se)](https://github.com/p12se) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=p12se), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ap12se)] +* [Peter Kokot (peterkokot)](https://github.com/peterkokot) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=peterkokot), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Apeterkokot)] — _translator and maintainer (sl)_ +* [Raju Devidas Vindane (rajuvindane)](https://github.com/rajuvindane) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=rajuvindane), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Arajuvindane)] +* [Saksham Sharma (saksham0808)](https://github.com/saksham0808) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=saksham0808), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Asaksham0808)] +* [Kit Chan (shukitchan)](https://github.com/shukitchan) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=shukitchan), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ashukitchan)] +* [Simarpreet Singh (simar7)](https://github.com/simar7) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=simar7), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Asimar7)] +* [spmbt (spmbt)](https://github.com/spmbt) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=spmbt), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aspmbt)] — _translator (ru)_ +* [Steven Liu (stevenlordiam)](https://github.com/stevenlordiam) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=stevenlordiam), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Astevenlordiam)] — _translator (zh)_ +* [taxusyew](https://github.com/taxusyew) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=taxusyew), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ataxusyew)] +* [Sungjin Kang (ujuc)](https://github.com/ujuc) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ujuc), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aujuc)] — _translator (ko)_ +* [Joe Block (unixorn)](https://github.com/unixorn) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=unixorn), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aunixorn)] +* [Valeria de Paiva (vcvpaiva)](https://github.com/vcvpaiva) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=vcvpaiva), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Avcvpaiva)] — _translator (pt)_ +* [Eduardo Rolim (vndmtrx)](https://github.com/vndmtrx) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=vndmtrx), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Avndmtrx)] +* [Okunev Yu Dmitry (xaionaro)](https://github.com/xaionaro) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=xaionaro), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Axaionaro)] +* [Chunyang Xu (xuchunyang)](https://github.com/xuchunyang) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=xuchunyang), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Axuchunyang)] — _translator (zh)_ +* [Alex F. (youmee)](https://github.com/youmee) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=youmee), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ayoumee)] +* [Zack Piper (zackp30)](https://github.com/zackp30) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=zackp30), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Azackp30)] +* [Xudong Zhang (zxdvd)](https://github.com/zxdvd) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=zxdvd), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Azxdvd)] + +If you see inaccuracies or omissions, please file an issue, or edit the authors-info.yml file, regenerate, and file a PR. + + + +(This file was auto-generated by [ghizmo assemble-authors](https://github.com/jlevy/ghizmo).) \ No newline at end of file diff --git a/README.md b/README.md index 945748b..9df04bb 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,14 @@ ![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](cowsay.png) -Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways. This is a selection of notes and tips on using the command-line that I've found useful when working on Linux. Some tips are elementary, and some are fairly specific, sophisticated, or obscure. This page is not long, but if you can use and recall all the items here, you know a lot. +Fluency on the command line is a skill often neglected or considered arcane, but it improves your flexibility and productivity as an engineer in both obvious and subtle ways. This is a selection of notes and tips on using the command-line that we've found useful when working on Linux. Some tips are elementary, and some are fairly specific, sophisticated, or obscure. This page is not long, but if you can use and recall all the items here, you know a lot. +This work is the result of [many authors and translators](AUTHORS.md). Much of this [originally](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands) [appeared](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix) on [Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know), -but given the interest there, it seems it's worth using Github, where people more talented than I can readily suggest improvements. If you see an error or something that could be better, please submit an issue or PR! (Of course please review the meta section and existing PRs/issues first.) +but given the interest there, it seemed worth using GitHub, where people more talented than the original author could readily suggest improvements. If you see an error or something that could be better, please submit an issue or PR! (Of course please review the meta section and existing PRs/issues first.) ## Meta diff --git a/admin/authors-info.yml b/admin/authors-info.yml new file mode 100644 index 0000000..a7b4a63 --- /dev/null +++ b/admin/authors-info.yml @@ -0,0 +1,32 @@ +# This file is used to configure the "ghizmo assemble-authors" command. + +header: | + This work is the result of the effort of many people around the world. + Contributors are listed in alphabetical order by GitHub id. + This file is maintained only in English. + +footer: | + If you see inaccuracies or omissions, please file an issue, or edit the authors-info.yml file, regenerate, and file a PR. + +roles: + jlevy: original author and maintainer + ceoaliongroo: translator and maintainer (es) + aaossa: translator (es) + BishopWolf: translator (es) + Ungsik-Yun: translator and maintainer (ko) + Snowcat8436: translator (ko) + ujuc: translator (ko) + hunkim: translator (ko) + niltonvasques : translator and maintainer (pt) + vcvpaiva: translator (pt) + olegberman: translator and maintainer (ru) + spmbt: translator (ru) + osmero: translator (ru) + grigory-rechistov: translator (ru) + kastian: translator (ru) + githubashto: translator (ru) + peterkokot: translator and maintainer (sl) + Psycho7: translator and maintainer (zh) + xuchunyang: translator (zh) + stevenlordiam: translator (zh) + Armour: translator (zh) From 3c35319413c2e45b8f4af6b2a94b98f569964172 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Thu, 1 Oct 2015 09:37:03 -0700 Subject: [PATCH 47/59] ja: Add links and new translator/maintainer. Following #283. --- AUTHORS.md | 3 ++- README-es.md | 4 +++- README-ja.md | 4 +++- README-ko.md | 4 +++- README-pt.md | 4 +++- README-ru.md | 4 +++- README-sl.md | 4 +++- README-zh.md | 4 +++- README.md | 4 +++- admin/authors-info.yml | 1 + 10 files changed, 27 insertions(+), 9 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 9e8450f..b3cdfe9 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -35,11 +35,12 @@ This file is maintained only in English. * [Dave Loyall (daveloyall)](https://github.com/daveloyall) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=daveloyall), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adaveloyall)] * [James Luck (delucks)](https://github.com/delucks) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=delucks), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adelucks)] * [Dima Paloskin (dimapaloskin)](https://github.com/dimapaloskin) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=dimapaloskin), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adimapaloskin)] +* [doublemarket (doublemarket)](https://github.com/doublemarket) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=doublemarket), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adoublemarket)] — _translator and maintainer (ja)_ * [Fazle Arefin (fazlearefin)](https://github.com/fazlearefin) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=fazlearefin), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Afazlearefin)] * [githubashto](https://github.com/githubashto) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=githubashto), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agithubashto)] — _translator (ru)_ * [The Gitter Badger (gitter-badger)](https://github.com/gitter-badger) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=gitter-badger), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agitter-badger)] * [Grigory Rechistov (grigory-rechistov)](https://github.com/grigory-rechistov) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grigory-rechistov), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrigory-rechistov)] — _translator (ru)_ -* [grossws (grossws)](https://github.com/grossws) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grossws), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrossws)] +* [Konstantin Gribov (grossws)](https://github.com/grossws) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grossws), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrossws)] * [Beau Hastings (hastinbe)](https://github.com/hastinbe) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=hastinbe), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahastinbe)] * [Sung Kim (hunkim)](https://github.com/hunkim) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=hunkim), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahunkim)] — _translator (ko)_ * [Ivgeni Segal (isegal)](https://github.com/isegal) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=isegal), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aisegal)] diff --git a/README-es.md b/README-es.md index e212b80..ac0e7ba 100644 --- a/README-es.md +++ b/README-es.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # El Arte del Terminal diff --git a/README-ja.md b/README-ja.md index ce539c9..2e5a31f 100644 --- a/README-ja.md +++ b/README-ja.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] 原文のコミット [bb0c38c0899339e836c37eead4a9534b06c56662](https://github.com/jlevy/the-art-of-command-line/blob/bb0c38c0899339e836c37eead4a9534b06c56662/README.md) diff --git a/README-ko.md b/README-ko.md index aec2dd1..d576ce3 100644 --- a/README-ko.md +++ b/README-ko.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # The Art of Command Line diff --git a/README-pt.md b/README-pt.md index 70e79b4..fc066e0 100644 --- a/README-pt.md +++ b/README-pt.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # A arte da linha de comando diff --git a/README-ru.md b/README-ru.md index 61a28bb..644896a 100644 --- a/README-ru.md +++ b/README-ru.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # Искусство командной строки diff --git a/README-sl.md b/README-sl.md index 6520b89..be6d3c6 100644 --- a/README-sl.md +++ b/README-sl.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # Umetnost ukazne vrstice diff --git a/README-zh.md b/README-zh.md index e125835..b595d98 100644 --- a/README-zh.md +++ b/README-zh.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # 命令行的艺术 diff --git a/README.md b/README.md index 9df04bb..29271c3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -[ Languages: [English](README.md), [Español](README-es.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) ] +[ Languages: +[English](README.md), [Español](README-es.md), [日本語](README-ja.md), [한국어](README-ko.md), [Português](README-pt.md), [Русский](README-ru.md), [Slovenščina](README-sl.md), [中文](README-zh.md) +] # The Art of Command Line diff --git a/admin/authors-info.yml b/admin/authors-info.yml index a7b4a63..8ef5bef 100644 --- a/admin/authors-info.yml +++ b/admin/authors-info.yml @@ -13,6 +13,7 @@ roles: ceoaliongroo: translator and maintainer (es) aaossa: translator (es) BishopWolf: translator (es) + doublemarket: translator and maintainer (ja) Ungsik-Yun: translator and maintainer (ko) Snowcat8436: translator (ko) ujuc: translator (ko) From efd60f49e775a4debb675e93212d5ba9d79258e5 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Sat, 3 Oct 2015 14:16:06 -0700 Subject: [PATCH 48/59] A few fixups to author tracking. Sort case-insensitively. Track commits/issues. Drop gitter-badger robot. Improves #289. --- AUTHORS.md | 155 +++++++++++++++++++++-------------------- admin/authors-info.yml | 9 ++- 2 files changed, 85 insertions(+), 79 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index b3cdfe9..17819c4 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,85 +1,86 @@ # Authors This work is the result of the effort of many people around the world. -Contributors are listed in alphabetical order by GitHub id. -This file is maintained only in English. +Contributors are listed in alphabetical order by GitHub login. -* [Guo Chong (Armour)](https://github.com/Armour) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Armour), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AArmour)] — _translator (zh)_ -* [Alex Vergara Gil (BishopWolf)](https://github.com/BishopWolf) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=BishopWolf), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ABishopWolf)] — _translator (es)_ -* [Colas BROUX (ColasBroux)](https://github.com/ColasBroux) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ColasBroux), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AColasBroux)] -* [Deborah Digges (Deborah-Digges)](https://github.com/Deborah-Digges) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Deborah-Digges), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ADeborah-Digges)] -* [Vincent Wong (EaterOA)](https://github.com/EaterOA) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=EaterOA), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AEaterOA)] -* [Hunter-Github](https://github.com/Hunter-Github) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Hunter-Github), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AHunter-Github)] -* [曾楚杰 (Psycho7)](https://github.com/Psycho7) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Psycho7), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3APsycho7)] — _translator and maintainer (zh)_ -* [Rasmus Wriedt Larsen (RasmusWL)](https://github.com/RasmusWL) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=RasmusWL), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ARasmusWL)] -* [Snowcat8436 (Snowcat8436)](https://github.com/Snowcat8436) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Snowcat8436), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ASnowcat8436)] — _translator (ko)_ -* [Soham Chakraborty (SohamChakraborty)](https://github.com/SohamChakraborty) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=SohamChakraborty), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ASohamChakraborty)] -* [Fabien Dubosson (StreakyCobra)](https://github.com/StreakyCobra) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=StreakyCobra), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AStreakyCobra)] -* [Ungsik Yun (Ungsik-Yun)](https://github.com/Ungsik-Yun) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=Ungsik-Yun), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AUngsik-Yun)] — _translator and maintainer (ko)_ -* [Antonio Ossa (aaossa)](https://github.com/aaossa) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=aaossa), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaaossa)] — _translator (es)_ -* [Ahmet Alp Balkan (ahmetalpbalkan)](https://github.com/ahmetalpbalkan) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ahmetalpbalkan), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aahmetalpbalkan)] -* [Semir Patel (analogue)](https://github.com/analogue) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=analogue), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aanalogue)] -* [Desmond Stonie (aneasystone)](https://github.com/aneasystone) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=aneasystone), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaneasystone)] -* [Brad Beyenhof (augmentedfourth)](https://github.com/augmentedfourth) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=augmentedfourth), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaugmentedfourth)] -* [Bryce J. (bj1)](https://github.com/bj1) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=bj1), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Abj1)] -* [Arturo Fernandez (bsnux)](https://github.com/bsnux) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=bsnux), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Absnux)] -* [Alex Cabrera (cabreraalex)](https://github.com/cabreraalex) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=cabreraalex), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acabreraalex)] -* [Carlos Mantilla (ceoaliongroo)](https://github.com/ceoaliongroo) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ceoaliongroo), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aceoaliongroo)] — _translator and maintainer (es)_ -* [Chris Kuehl (chriskuehl)](https://github.com/chriskuehl) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=chriskuehl), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Achriskuehl)] -* [Corey "See More" Richardson (cmr)](https://github.com/cmr) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=cmr), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acmr)] -* [Chris Rhodes (crr0004)](https://github.com/crr0004) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=crr0004), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acrr0004)] -* [Chelsea Voss (csvoss)](https://github.com/csvoss) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=csvoss), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acsvoss)] -* [Daniel t. (danasmera)](https://github.com/danasmera) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=danasmera), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adanasmera)] -* [Dmytro Danylevskyi (danylevskyi)](https://github.com/danylevskyi) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=danylevskyi), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adanylevskyi)] -* [Dave Loyall (daveloyall)](https://github.com/daveloyall) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=daveloyall), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adaveloyall)] -* [James Luck (delucks)](https://github.com/delucks) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=delucks), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adelucks)] -* [Dima Paloskin (dimapaloskin)](https://github.com/dimapaloskin) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=dimapaloskin), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adimapaloskin)] -* [doublemarket (doublemarket)](https://github.com/doublemarket) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=doublemarket), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adoublemarket)] — _translator and maintainer (ja)_ -* [Fazle Arefin (fazlearefin)](https://github.com/fazlearefin) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=fazlearefin), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Afazlearefin)] -* [githubashto](https://github.com/githubashto) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=githubashto), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agithubashto)] — _translator (ru)_ -* [The Gitter Badger (gitter-badger)](https://github.com/gitter-badger) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=gitter-badger), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agitter-badger)] -* [Grigory Rechistov (grigory-rechistov)](https://github.com/grigory-rechistov) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grigory-rechistov), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrigory-rechistov)] — _translator (ru)_ -* [Konstantin Gribov (grossws)](https://github.com/grossws) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=grossws), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrossws)] -* [Beau Hastings (hastinbe)](https://github.com/hastinbe) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=hastinbe), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahastinbe)] -* [Sung Kim (hunkim)](https://github.com/hunkim) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=hunkim), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahunkim)] — _translator (ko)_ -* [Ivgeni Segal (isegal)](https://github.com/isegal) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=isegal), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aisegal)] -* [Alan Brogan (jalanb)](https://github.com/jalanb) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jalanb), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajalanb)] -* [Joshua Levy (jlevy)](https://github.com/jlevy) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jlevy), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajlevy)] — _original author and maintainer_ -* [Jesse Sightler (jsight)](https://github.com/jsight) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jsight), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajsight)] -* [Konstantin Mikhaylov (jtraub)](https://github.com/jtraub) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=jtraub), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajtraub)] -* [Wael M. Nasreddine (kalbasit)](https://github.com/kalbasit) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kalbasit), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akalbasit)] -* [Colin Chan (kalgynirae)](https://github.com/kalgynirae) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kalgynirae), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akalgynirae)] -* [Michail Kargakis (kargakis)](https://github.com/kargakis) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kargakis), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akargakis)] -* [kstn (kastian)](https://github.com/kastian) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kastian), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akastian)] — _translator (ru)_ -* [Kesu J (kesu)](https://github.com/kesu) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kesu), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akesu)] -* [Konstantin Ilyashenko (kostya13)](https://github.com/kostya13) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=kostya13), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akostya13)] -* [Pavel Zhukov (landgraf)](https://github.com/landgraf) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=landgraf), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Alandgraf)] -* [Matjaž Lipuš (matjaz)](https://github.com/matjaz) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=matjaz), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amatjaz)] -* [Mayra Cabrera (mayra-cabrera)](https://github.com/mayra-cabrera) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=mayra-cabrera), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amayra-cabrera)] -* [Michael Barlow (michaelbarlow7)](https://github.com/michaelbarlow7) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=michaelbarlow7), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amichaelbarlow7)] -* [Harry Moreno (morenoh149)](https://github.com/morenoh149) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=morenoh149), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amorenoh149)] -* [Nilton Vasques (niltonvasques)](https://github.com/niltonvasques) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=niltonvasques), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aniltonvasques)] — _translator and maintainer (pt)_ -* [Oleg Berman (olegberman)](https://github.com/olegberman) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=olegberman), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aolegberman)] — _translator and maintainer (ru)_ -* [osmero](https://github.com/osmero) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=osmero), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aosmero)] — _translator (ru)_ -* [Serg Petrov (p12se)](https://github.com/p12se) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=p12se), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ap12se)] -* [Peter Kokot (peterkokot)](https://github.com/peterkokot) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=peterkokot), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Apeterkokot)] — _translator and maintainer (sl)_ -* [Raju Devidas Vindane (rajuvindane)](https://github.com/rajuvindane) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=rajuvindane), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Arajuvindane)] -* [Saksham Sharma (saksham0808)](https://github.com/saksham0808) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=saksham0808), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Asaksham0808)] -* [Kit Chan (shukitchan)](https://github.com/shukitchan) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=shukitchan), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ashukitchan)] -* [Simarpreet Singh (simar7)](https://github.com/simar7) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=simar7), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Asimar7)] -* [spmbt (spmbt)](https://github.com/spmbt) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=spmbt), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aspmbt)] — _translator (ru)_ -* [Steven Liu (stevenlordiam)](https://github.com/stevenlordiam) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=stevenlordiam), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Astevenlordiam)] — _translator (zh)_ -* [taxusyew](https://github.com/taxusyew) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=taxusyew), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ataxusyew)] -* [Sungjin Kang (ujuc)](https://github.com/ujuc) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=ujuc), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aujuc)] — _translator (ko)_ -* [Joe Block (unixorn)](https://github.com/unixorn) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=unixorn), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aunixorn)] -* [Valeria de Paiva (vcvpaiva)](https://github.com/vcvpaiva) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=vcvpaiva), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Avcvpaiva)] — _translator (pt)_ -* [Eduardo Rolim (vndmtrx)](https://github.com/vndmtrx) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=vndmtrx), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Avndmtrx)] -* [Okunev Yu Dmitry (xaionaro)](https://github.com/xaionaro) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=xaionaro), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Axaionaro)] -* [Chunyang Xu (xuchunyang)](https://github.com/xuchunyang) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=xuchunyang), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Axuchunyang)] — _translator (zh)_ -* [Alex F. (youmee)](https://github.com/youmee) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=youmee), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ayoumee)] -* [Zack Piper (zackp30)](https://github.com/zackp30) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=zackp30), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Azackp30)] -* [Xudong Zhang (zxdvd)](https://github.com/zxdvd) [[commits](https://github.com/jlevy/the-art-of-command-line/commits?author=zxdvd), [issues](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Azxdvd)] +* [Antonio Ossa (aaossa)](https://github.com/aaossa) — [5+](https://github.com/jlevy/the-art-of-command-line/commits?author=aaossa)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaaossa) — _translator (es)_ +* [Ahmet Alp Balkan (ahmetalpbalkan)](https://github.com/ahmetalpbalkan) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=ahmetalpbalkan)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aahmetalpbalkan) +* [Semir Patel (analogue)](https://github.com/analogue) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=analogue)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aanalogue) +* [Desmond Stonie (aneasystone)](https://github.com/aneasystone) — [3+](https://github.com/jlevy/the-art-of-command-line/commits?author=aneasystone)/[8+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaneasystone) +* [Guo Chong (Armour)](https://github.com/Armour) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=Armour)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AArmour) — _translator (zh)_ +* [Brad Beyenhof (augmentedfourth)](https://github.com/augmentedfourth) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=augmentedfourth)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aaugmentedfourth) +* [Alex Vergara Gil (BishopWolf)](https://github.com/BishopWolf) — [4+](https://github.com/jlevy/the-art-of-command-line/commits?author=BishopWolf)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ABishopWolf) — _translator (es)_ +* [Bryce J. (bj1)](https://github.com/bj1) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=bj1)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Abj1) +* [Arturo Fernandez (bsnux)](https://github.com/bsnux) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=bsnux)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Absnux) +* [Alex Cabrera (cabreraalex)](https://github.com/cabreraalex) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=cabreraalex)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acabreraalex) +* [Carlos Mantilla (ceoaliongroo)](https://github.com/ceoaliongroo) — [17+](https://github.com/jlevy/the-art-of-command-line/commits?author=ceoaliongroo)/[11+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aceoaliongroo) — _translator and maintainer (es)_ +* [Chris Kuehl (chriskuehl)](https://github.com/chriskuehl) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=chriskuehl)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Achriskuehl) +* [Corey "See More" Richardson (cmr)](https://github.com/cmr) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=cmr)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acmr) +* [Colas BROUX (ColasBroux)](https://github.com/ColasBroux) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=ColasBroux)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AColasBroux) +* [Chris Rhodes (crr0004)](https://github.com/crr0004) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=crr0004)/[4+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acrr0004) +* [Chelsea Voss (csvoss)](https://github.com/csvoss) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=csvoss)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Acsvoss) +* [Daniel t. (danasmera)](https://github.com/danasmera) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=danasmera)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adanasmera) +* [Dmytro Danylevskyi (danylevskyi)](https://github.com/danylevskyi) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=danylevskyi)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adanylevskyi) +* [Dave Loyall (daveloyall)](https://github.com/daveloyall) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=daveloyall)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adaveloyall) +* [Deborah Digges (Deborah-Digges)](https://github.com/Deborah-Digges) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=Deborah-Digges)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ADeborah-Digges) +* [James Luck (delucks)](https://github.com/delucks) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=delucks)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adelucks) +* [Dima Paloskin (dimapaloskin)](https://github.com/dimapaloskin) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=dimapaloskin)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adimapaloskin) +* [doublemarket (doublemarket)](https://github.com/doublemarket) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=doublemarket)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Adoublemarket) — _translator and maintainer (ja)_ +* [Vincent Wong (EaterOA)](https://github.com/EaterOA) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=EaterOA)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AEaterOA) +* [Fazle Arefin (fazlearefin)](https://github.com/fazlearefin) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=fazlearefin)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Afazlearefin) +* [githubashto](https://github.com/githubashto) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=githubashto)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agithubashto) — _translator (ru)_ +* [Grigory Rechistov (grigory-rechistov)](https://github.com/grigory-rechistov) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=grigory-rechistov)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrigory-rechistov) — _translator (ru)_ +* [Konstantin Gribov (grossws)](https://github.com/grossws) — [3+](https://github.com/jlevy/the-art-of-command-line/commits?author=grossws)/[6+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Agrossws) +* [Beau Hastings (hastinbe)](https://github.com/hastinbe) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=hastinbe)/[4+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahastinbe) +* [Sung Kim (hunkim)](https://github.com/hunkim) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=hunkim)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ahunkim) — _translator (ko)_ +* [Hunter-Github](https://github.com/Hunter-Github) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=Hunter-Github)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AHunter-Github) +* [Ivgeni Segal (isegal)](https://github.com/isegal) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=isegal)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aisegal) +* [Alan Brogan (jalanb)](https://github.com/jalanb) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=jalanb)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajalanb) +* [Joshua Levy (jlevy)](https://github.com/jlevy) — [102+](https://github.com/jlevy/the-art-of-command-line/commits?author=jlevy)/[19+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajlevy) — _original author and maintainer_ +* [Jesse Sightler (jsight)](https://github.com/jsight) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=jsight)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajsight) +* [Konstantin Mikhaylov (jtraub)](https://github.com/jtraub) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=jtraub)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ajtraub) +* [Wael M. Nasreddine (kalbasit)](https://github.com/kalbasit) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=kalbasit)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akalbasit) +* [Colin Chan (kalgynirae)](https://github.com/kalgynirae) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=kalgynirae)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akalgynirae) +* [Michail Kargakis (kargakis)](https://github.com/kargakis) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=kargakis)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akargakis) +* [kstn (kastian)](https://github.com/kastian) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=kastian)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akastian) — _translator (ru)_ +* [Kesu J (kesu)](https://github.com/kesu) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=kesu)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akesu) +* [Konstantin Ilyashenko (kostya13)](https://github.com/kostya13) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=kostya13)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Akostya13) +* [Pavel Zhukov (landgraf)](https://github.com/landgraf) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=landgraf)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Alandgraf) +* [Matjaž Lipuš (matjaz)](https://github.com/matjaz) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=matjaz)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amatjaz) +* [Mayra Cabrera (mayra-cabrera)](https://github.com/mayra-cabrera) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=mayra-cabrera)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amayra-cabrera) +* [Michael Barlow (michaelbarlow7)](https://github.com/michaelbarlow7) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=michaelbarlow7)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amichaelbarlow7) +* [Harry Moreno (morenoh149)](https://github.com/morenoh149) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=morenoh149)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Amorenoh149) +* [Nilton Vasques (niltonvasques)](https://github.com/niltonvasques) — [24+](https://github.com/jlevy/the-art-of-command-line/commits?author=niltonvasques)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aniltonvasques) — _translator and maintainer (pt)_ +* [Oleg Berman (olegberman)](https://github.com/olegberman) — [15+](https://github.com/jlevy/the-art-of-command-line/commits?author=olegberman)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aolegberman) — _translator and maintainer (ru)_ +* [osmero](https://github.com/osmero) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=osmero)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aosmero) — _translator (ru)_ +* [Serg Petrov (p12se)](https://github.com/p12se) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=p12se)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ap12se) +* [Peter Kokot (peterkokot)](https://github.com/peterkokot) — [25+](https://github.com/jlevy/the-art-of-command-line/commits?author=peterkokot)/[18+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Apeterkokot) — _translator and maintainer (sl)_ +* [曾楚杰 (Psycho7)](https://github.com/Psycho7) — [16+](https://github.com/jlevy/the-art-of-command-line/commits?author=Psycho7)/[7+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3APsycho7) — _translator and maintainer (zh)_ +* [Raju Devidas Vindane (rajuvindane)](https://github.com/rajuvindane) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=rajuvindane)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Arajuvindane) +* [Rasmus Wriedt Larsen (RasmusWL)](https://github.com/RasmusWL) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=RasmusWL)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ARasmusWL) +* [Saksham Sharma (saksham0808)](https://github.com/saksham0808) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=saksham0808)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Asaksham0808) +* [Kit Chan (shukitchan)](https://github.com/shukitchan) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=shukitchan)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ashukitchan) +* [Simarpreet Singh (simar7)](https://github.com/simar7) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=simar7)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Asimar7) +* [Snowcat8436 (Snowcat8436)](https://github.com/Snowcat8436) — [4+](https://github.com/jlevy/the-art-of-command-line/commits?author=Snowcat8436)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ASnowcat8436) — _translator (ko)_ +* [Soham Chakraborty (SohamChakraborty)](https://github.com/SohamChakraborty) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=SohamChakraborty)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3ASohamChakraborty) +* [spmbt (spmbt)](https://github.com/spmbt) — [13+](https://github.com/jlevy/the-art-of-command-line/commits?author=spmbt)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aspmbt) — _translator (ru)_ +* [Steven Liu (stevenlordiam)](https://github.com/stevenlordiam) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=stevenlordiam)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Astevenlordiam) — _translator (zh)_ +* [Fabien Dubosson (StreakyCobra)](https://github.com/StreakyCobra) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=StreakyCobra)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AStreakyCobra) +* [taxusyew](https://github.com/taxusyew) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=taxusyew)/[2+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ataxusyew) +* [Sungjin Kang (ujuc)](https://github.com/ujuc) — [6+](https://github.com/jlevy/the-art-of-command-line/commits?author=ujuc)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aujuc) — _translator (ko)_ +* [Ungsik Yun (Ungsik-Yun)](https://github.com/Ungsik-Yun) — [15+](https://github.com/jlevy/the-art-of-command-line/commits?author=Ungsik-Yun)/[3+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3AUngsik-Yun) — _translator and maintainer (ko)_ +* [Joe Block (unixorn)](https://github.com/unixorn) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=unixorn)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Aunixorn) +* [Valeria de Paiva (vcvpaiva)](https://github.com/vcvpaiva) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=vcvpaiva)/[0+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Avcvpaiva) — _translator (pt)_ +* [Eduardo Rolim (vndmtrx)](https://github.com/vndmtrx) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=vndmtrx)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Avndmtrx) +* [Okunev Yu Dmitry (xaionaro)](https://github.com/xaionaro) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=xaionaro)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Axaionaro) +* [Chunyang Xu (xuchunyang)](https://github.com/xuchunyang) — [13+](https://github.com/jlevy/the-art-of-command-line/commits?author=xuchunyang)/[7+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Axuchunyang) — _translator (zh)_ +* [Alex F. (youmee)](https://github.com/youmee) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=youmee)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Ayoumee) +* [Zack Piper (zackp30)](https://github.com/zackp30) — [2+](https://github.com/jlevy/the-art-of-command-line/commits?author=zackp30)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Azackp30) +* [Xudong Zhang (zxdvd)](https://github.com/zxdvd) — [1+](https://github.com/jlevy/the-art-of-command-line/commits?author=zxdvd)/[1+](https://github.com/jlevy/the-art-of-command-line/issues?q=author%3Azxdvd) + +Numbers link to commits/issues. +For simplicity, this file is maintained only in English. If you see inaccuracies or omissions, please file an issue, or edit the authors-info.yml file, regenerate, and file a PR. diff --git a/admin/authors-info.yml b/admin/authors-info.yml index 8ef5bef..77c54cd 100644 --- a/admin/authors-info.yml +++ b/admin/authors-info.yml @@ -2,12 +2,17 @@ header: | This work is the result of the effort of many people around the world. - Contributors are listed in alphabetical order by GitHub id. - This file is maintained only in English. + Contributors are listed in alphabetical order by GitHub login. footer: | + Numbers link to commits/issues. + For simplicity, this file is maintained only in English. + If you see inaccuracies or omissions, please file an issue, or edit the authors-info.yml file, regenerate, and file a PR. +exclude: + gitter-badger + roles: jlevy: original author and maintainer ceoaliongroo: translator and maintainer (es) From d9cf3251f082aeaf460d7379b41ffa3277cb2a5d Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 5 Oct 2015 17:39:16 +0200 Subject: [PATCH 49/59] sl: update translation --- README-sl.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README-sl.md b/README-sl.md index be6d3c6..655b40f 100644 --- a/README-sl.md +++ b/README-sl.md @@ -21,13 +21,14 @@ ![curl -s 'https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md' | egrep -o '`\w+`' | tr -d '`' | cowsay -W50](cowsay.png) -Jedrnatost v ukazni vrstici je znanje, ki je pogostokrat zanemarjeno ali smatrano za zastarelo, vendar izboljša vašo fleksibilnost in produktivnost kot inženir na očitne in neočitne načine. To so izbrani zapiski in nasveti glede uporabe ukazne vrstice, ki sem jo našel uporabno pri delu z Linux-om. Nekateri nasveti so elementarni in nekateri so precej določeni, sofisticirani ali nepregledni. Ta stran ni dolga, vendar če lahko uporabite in se spomnite vseh elementov tu, boste vedeli veliko. +Jedrnatost v ukazni vrstici je znanje, ki je pogostokrat zanemarjeno ali smatrano za zastarelo, vendar izboljša vašo fleksibilnost in produktivnost kot inženir na očitne in neočitne načine. To so izbrani zapiski in nasveti glede uporabe ukazne vrstice, ki smo jo našli uporabno pri delu z Linux-om. Nekateri nasveti so elementarni in nekateri so precej določeni, sofisticirani ali nepregledni. Ta stran ni dolga, vendar če lahko uporabite in se spomnite vseh elementov tu, boste vedeli veliko. +To delo je rezultat [mnogih avtorjev in prevajalcev](AUTHORS.md). Veliko tega se [prvotno](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands) [pojavi](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix) na [Quori](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know), -vendar glede na dani interes tu, izgleda vredno uporabe GitHub-a, kjer ljudje bolj talentirani kot jaz lahko bralno predlagajo izboljšave. Če opazite napako ali nekaj, kar je lahko bolje, prosim, pošljite težavo ali zahtevek potega (PR)! (Seveda, prosim preglejte meta sekcijo in obstoječe težave/zahtevke potega najprej.) +vendar glede na dani interes tu, izgleda vredno uporabe GitHub-a, kjer lahko ljudje bolj talentirani od prvotnega avtorja takoj predlagajo izboljšave. Če opazite napako ali nekaj, kar je lahko bolje, prosim, pošljite težavo ali zahtevek potega (PR)! (Seveda, prosim preglejte meta sekcijo in obstoječe težave/zahtevke potega najprej.) ## Meta @@ -224,7 +225,7 @@ Opombe: - Standardna orodja za popravljanje izvorne kode so `diff` in `patch`. Glejte tudi `diffstat` za povzetek statistike diff-a in `sdiff` za diff drug ob drugem. Bodite pozorni, saj `diff -r` deluje za celotne direktorije. Uporabite `diff -r tree1 tree2 | diffstat` za povzetek sprememb. Uporabite `vimdiff` za primerjanje in urejanje datotek. -- Pri binarnih datotekah uporabite `hd` za enostavne heksadecimalne izpise in `bvi` za binarno urejanje. +- Pri binarnih datotekah uporabite `hd`, `hexdump` ali `xxd` za enostavne heksadecimalne izpise in `bvi` ali `biew` za binarno urejanje. - `strings` (plus `grep` itd.) vam omogoča najti bite v tekstu tudi za binarne datoteke. @@ -396,7 +397,7 @@ Nekaj primerov sestavljanja ukazov skupaj: - `pv`: nadzira napredek podatkov skozi cev -- `hd` in `bvi`: izvrže ali uredi binarne datoteke +- `hd`, `hexdump`, `xxd`, `biew` in `bvi`: izvrže ali uredi binarne datoteke - `strings`: izvleče tekst iz binarnih datotek From d9c87962399f90aa85363ca3496d0b2affd4af51 Mon Sep 17 00:00:00 2001 From: Michael Diamond Date: Mon, 5 Oct 2015 18:43:26 -0400 Subject: [PATCH 50/59] Tweak the language for the grep . * tip. The previous text didn't highlight why this is more useful than, say `cat *` or `vi *`. Personally, I still don't think it's that useful, but this seems a little clearer, at least. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5cebd78..242c604 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ A few examples of piecing together commands: cat a b b | sort | uniq -u > c # c is set difference a - b ``` -- Use `grep . *` to visually examine all contents of all files in a directory, e.g. for directories filled with config settings, like `/sys`, `/proc`, `/etc`. +- Use `grep . * | less` to quickly examine the contents of all files in a directory - each line is paired with the filename. This can be useful for directories filled with config settings like those in `/sys`, `/proc`, `/etc`. - Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python): From b564befde5655c81f0a0cc3d3bfb740f52e3f2ae Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Mon, 5 Oct 2015 21:16:37 -0700 Subject: [PATCH 51/59] Add another example of head And tweak language of #292. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 242c604..80ea240 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ A few examples of piecing together commands: cat a b b | sort | uniq -u > c # c is set difference a - b ``` -- Use `grep . * | less` to quickly examine the contents of all files in a directory - each line is paired with the filename. This can be useful for directories filled with config settings like those in `/sys`, `/proc`, `/etc`. +- Use `grep . *` to quickly examine the contents of all files in a directory (so each line is paired with the filename), or `head -100 *` (so each file has a heading). This can be useful for directories filled with config settings like those in `/sys`, `/proc`, `/etc`. - Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python): From f537d1e0cf92fdbc95bc68a3f5c5ae6a9677f91e Mon Sep 17 00:00:00 2001 From: Chujie Zeng Date: Tue, 6 Oct 2015 21:21:44 +0800 Subject: [PATCH 52/59] Fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80ea240..f18189f 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ Notes: - A few other options relevant to ssh are security sensitive and should be enabled with care, e.g. per subnet or host or in trusted networks: `StrictHostKeyChecking=no`, `ForwardAgent=yes` -- Consider [`mosh`](https://mosh.mit.edu/) an an alternative to ssh that uses UDP, avoiding dropped connections and adding convenience on the road (requires server-side setup). +- Consider [`mosh`](https://mosh.mit.edu/) an alternative to ssh that uses UDP, avoiding dropped connections and adding convenience on the road (requires server-side setup). - To get the permissions on a file in octal form, which is useful for system configuration but not available in `ls` and easy to bungle, use something like ```sh @@ -371,7 +371,7 @@ A few examples of piecing together commands: - `socat`: socket relay and tcp port forwarder (similar to `netcat`) -- [`slurm`](https://github.com/mattthias/slurm): network trafic visualization +- [`slurm`](https://github.com/mattthias/slurm): network traffic visualization - `dd`: moving data between files or devices From b06fff3307cac596ec52822de80f369b076fb05b Mon Sep 17 00:00:00 2001 From: Chujie Zeng Date: Tue, 6 Oct 2015 21:22:01 +0800 Subject: [PATCH 53/59] zh: Sync with English --- README-zh.md | 66 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/README-zh.md b/README-zh.md index 3ac0f3d..eb27bae 100644 --- a/README-zh.md +++ b/README-zh.md @@ -35,7 +35,7 @@ - 这篇文章对刚接触命令行的新手以及具有命令行使用经验的人都有用处。本文致力于做到覆盖面广(尽量包括一切重要的内容),具体(给出最常见的具体的例子)以及简洁(避免一些不必要的东西以及一些偏题的可以在其他地方翻阅到文献的东西)。 每个小技巧在某个特定情境下都是基本的或能够显著地节约时间。 - 本文为 Linux 所写,除了[仅限 MacOS X 系统](#仅限-macos-x-系统)节。其它节中的大部分内容都适用于其它 Unix 系统或 MacOS 系统,甚至 Cygwin。 -- 本文关注于交互式 Bash,尽管很多技巧适用于其他 shell 或 Bash 脚本。 +- 本文关注于交互式 Bash,尽管很多技巧也适用于其他 shell 或 Bash 脚本。 - 本文包括了“标准的”Unix 命令和需要安装特定包的命令,只要它们足够重要。 注意事项: @@ -48,40 +48,42 @@ - 学习 Bash 的基础知识。具体来说,输入 `man bash` 并至少全文浏览一遍; 它很简单并且不长。其他的 shell 可能很好用,但 Bash 功能强大且几乎所有情况下都是可用的 ( *只*学习 zsh,fish 或其他的 shell 的话,在你自己的电脑上会显得很方便,但在很多情况下会限制你,比如当你需要在服务器上工作时)。 -- 学习并掌握至少一个基于文本的编辑器。通常 Vim (`vi`) 会是你最好的选择。 +- 学习并掌握至少一个基于文本的编辑器。通常 Vim (`vi`) 会是你最好的选择,因为在终端里进行随机编辑 Vim 真的毫无敌手,哪怕是 Emacs、某大型 IDE 甚至时下非常流行的编辑器。 - 学会如何使用 `man` 命令去阅读文档。学会使用 `apropos` 去查找文档。了解有些命令并不对应可执行文件,而是Bash内置的,可以使用 `help` 和 `help -d` 命令获取帮助信息。 - 学会使用 `>` 和 `<` 来重定向输出和输入,学会使用 `|` 来重定向管道。明白 `>` 会覆盖了输出文件而 `>>` 是在文件未添加。了解标准输出 stdout 和标准错误 stderr。 -- 学会使用通配符 `*` (或许再算上 `?` 和 `{`...`}`) 和引用以及引用中 `'` 和 `"` 的区别。 +- 学会使用通配符 `*` (或许再算上 `?` 和 `[`...`]`) 和引用以及引用中 `'` 和 `"` 的区别。 - 熟悉 Bash 任务管理工具:`&`,**ctrl-z**,**ctrl-c**,`jobs`,`fg`,`bg`,`kill` 等。 -- 了解 `ssh`,以及基本的无密码认证,`ssh-agent`,`ssh-add` 等。 +- 了解 `ssh`,以及学会通过使用 `ssh-agent`,`ssh-add` 等命令来实现基本的无密码认证。 -- 学会基本的文件管理:`ls` 和 `ls -l` (了解 `ls -l` 中每一列代表的意义),`less`,`head`,`tail` 和 `tail -f` (甚至 `less +F`),`ln` 和 `ln -s` (了解硬链接与软链接的区别),`chown`,`chmod`,`du` (硬盘使用情况概述:`du -hk *`)。 关于文件系统的管理,学习 `df`,`mount`,`fdisk`,`mkfs`,`lsblk`。 +- 学会基本的文件管理:`ls` 和 `ls -l` (了解 `ls -l` 中每一列代表的意义),`less`,`head`,`tail` 和 `tail -f` (甚至 `less +F`),`ln` 和 `ln -s` (了解硬链接与软链接的区别),`chown`,`chmod`,`du` (硬盘使用情况概述:`du -hk *`)。 关于文件系统的管理,学习 `df`,`mount`,`fdisk`,`mkfs`,`lsblk`。知道 inode 是什么(与 `ls -i` 和 `df -i` 等命令相关)。 - 学习基本的网络管理:`ip` 或 `ifconfig`,`dig`。 -- 熟悉正则表达式,以及 `grep`/`egrep` 里不同参数的作用,例如 `-i`,`-o`,`-v`,`-A`,`-B` 和 `-C`。 +- 熟悉正则表达式,以及 `grep`/`egrep` 里不同参数的作用,例如 `-i`,`-o`,`-v`,`-A`,`-B` 和 `-C`,这些参数是值得学习并掌握的。 -- 学会使用 `apt-get`,`yum`,`dnf` 或 `pacman` (取决于你使用的 Linux 发行版)来查找或安装包。确保你的环境中有 `pip` 来安装基于 Python 的命令行工具 (部分程序使用 `pip` 来安装会很简单)。 +- 学会使用 `apt-get`,`yum`,`dnf` 或 `pacman` (取决于你使用的 Linux 发行版)来查找或安装软件包。并确保你的环境中有 `pip` 来安装基于 Python 的命令行工具 (接下来提到的部分程序使用 `pip` 来安装会很方便)。 ## 日常使用 - 在 Bash 中,可以使用 **Tab** 自动补全参数,使用 **ctrl-r** 搜索命令行历史。 -- 在 Bash 中,使用 **ctrl-w** 删除你键入的最后一个单词,使用 **ctrl-u** 删除整行,使用 **alt-b** 和 **alt-f** 按单词移动,使用 **ctrl-k** 从光标处删除到行尾,使用 **ctrl-l** 清屏。键入 `man readline` 查看 Bash 中的默认快捷键,内容很多。例如 **alt-.** 循环地移向前一个参数,以及 **alt-*** 展开通配符。 +- 在 Bash 中,可以使用 **ctrl-w** 删除你键入的最后一个单词,使用 **ctrl-u** 删除整行,使用 **alt-b** 和 **alt-f** 以单词为单位移动光标,使用 **ctrl-a** 将光标移至行首,使用 **ctrl-e** 将光标移至行尾,使用 **ctrl-k** 删除光标至行尾的所有内容,使用 **ctrl-l** 清屏。键入 `man readline` 查看 Bash 中的默认快捷键,内容很多。例如 **alt-.** 循环地移向前一个参数,以及 **alt-*** 展开通配符。 -- 你喜欢的话,可以键入 `set -o vi` 来使用 vi 风格的快捷键。 +- 你喜欢的话,可以键入 `set -o vi` 来使用 vi 风格的快捷键,而 `set -o emacs` 可以把它改回来。 + +- 为了方便地键入长命令,在设置你的编辑器后(例如 `export EDITOR=vim`),键入 **ctrl-x** **ctrl-e** 会打开一个编辑器来编辑当前命令。在 vi 模式下则键入 **escape-v** 实现相同的功能。 - 键入 `history` 查看命令行历史记录。其中有许多缩写,例如 `!$`(最后键入的参数)和 `!!`(最后键入的命令),尽管通常被 **ctrl-r** 和 **alt-.** 取代。 - 回到上一个工作路径:`cd -` -- 如果你输入命令的时候改变了主意,按下 **alt-#** 在行首添加 `#`(将你输入的命令视为注释),并回车。这样做的话,之后你可以很方便的利用命令行历史回到你刚才输入到一半的命令。 +- 如果你输入命令的时候改变了主意,按下 **alt-#** 来在行首添加 `#`,或者依次按下 **ctrl-a**, **#**, **enter**。这样做的话,之后你可以很方便的利用命令行历史回到你刚才输入到一半的命令。 - 使用 `xargs` ( 或 `parallel`)。他们非常给力。注意到你可以控制每行参数个数(`-L`)和最大并行数(`-P`)。如果你不确定它们是否会按你想的那样工作,先使用 `xargs echo` 查看一下。此外,使用 `-I{}` 会很方便。例如: ```bash @@ -91,7 +93,7 @@ - `pstree -p` 有助于展示进程树。 -- 使用 `pgrep` 和 `pkill` 根据名字查找进程或发送信号。 +- 使用 `pgrep` 和 `pkill` 根据名字查找进程或发送信号(`-f` 参数通常有用)。 - 了解你可以发往进程的信号的种类。比如,使用 `kill -STOP [pid]` 停止一个进程。使用 `man 7 signal` 查看详细列表。 @@ -105,7 +107,11 @@ - 使用`alias`来创建常用命令的快捷形式。例如:`alias ll='ls -latr'`使你可以方便地执行`ls -latr`命令。 -- 在 Bash 脚本中,使用 `set -x` 去调试输出,尽可能的使用严格模式,使用 `set -e` 令脚本在发生错误时退出而不是继续运行,使用 `set -o pipefail` 严谨地对待错误(尽管问题可能很微妙)。当牵扯到很多脚本时,使用 `trap`。 +- 在 Bash 脚本中,使用 `set -x` 去调试输出,尽可能的使用严格模式,使用 `set -e` 令脚本在发生错误时退出而不是继续运行,使用 `set -u` 来检查是否使用了未赋值的变量,使用 `set -o pipefail` 严谨地对待错误(尽管问题可能很微妙)。当牵扯到很多脚本时,使用 `trap`。一个好的习惯是在脚本文件开头这样写,这会使它检测一些错误,并在错误发生时中断程序并输出信息: +```bash + set -euo pipefail + trap "echo 'error: Script failed: see failed command above'" ERR +``` - 在 Bash 脚本中,子 shell(使用括号`(...)`)是一种便捷的方式去组织参数。一个常见的例子是临时地移动工作路径,代码如下: ```bash @@ -116,6 +122,8 @@ - 在 Bash 中,注意到其中有许多形式的扩展。检查变量是否存在:`${name:?error message}`。例如,当 Bash 脚本需要一个参数时,可以使用这样的代码 `input_file=${1:?usage: $0 input_file}`。数学表达式:`i=$(( (i + 1) % 5 ))`。序列:`{1..10}`。 截断字符串:`${var%suffix}` 和 `${var#prefix}`。例如,假设 `var=foo.pdf`,那么 `echo ${var%.pdf}.txt` 将输出 `foo.txt`。 +- 使用括号扩展(`{`...`}`)可以减少不必要的重复输入相似文本以及文本组合。 + - 通过使用 `<(some command)` 可以将输出视为文件。例如,对比本地文件 `/etc/hosts` 和一个远程文件: ```sh diff /etc/hosts <(ssh somehost cat /etc/hosts) @@ -144,6 +152,8 @@ - 部分其他的关于 ssh 的选项是安全敏感且应当小心启用的。例如在可信任的网络中:`StrictHostKeyChecking=no`,`ForwardAgent=yes` +- 考虑使用 [`mosh`](https://mosh.mit.edu/) 作为 ssh 的替代品,它使用 UDP 协议。 + - 获取文件的八进制格式权限,使用类似如下的代码: ```sh stat -c '%A %a %n' /etc/timezone @@ -174,7 +184,7 @@ - Excel 或 CSV 文件的处理,[csvkit](https://github.com/onyxfish/csvkit) 提供了 `in2csv`,`csvcut`,`csvjoin`,`csvgrep` 等工具。 -- 关于 Amazon S3,[`s3cmd`](https://github.com/s3tools/s3cmd) 很方便而 [`s4cmd`](https://github.com/bloomreach/s4cmd) 更快。Amazon 官方的 [`aws`](https://github.com/aws/aws-cli) 是其他 AWS 相关工作的基础。 +- 关于 Amazon S3,[`s3cmd`](https://github.com/s3tools/s3cmd) 很方便而 [`s4cmd`](https://github.com/bloomreach/s4cmd) 更快。Amazon 官方的 [`aws`](https://github.com/aws/aws-cli) 以及 [`saws`](https://github.com/donnemartin/saws) 是其他 AWS 相关工作的基础。 - 了解如何使用 `sort` 和 `uniq`,包括 uniq 的 `-u` 参数和 `-d` 参数,详见后文一行代码节。另外可以了解一下 `comm`。 @@ -186,7 +196,7 @@ - 了解语言环境对许多命令行工具的微妙影响,包括排序的顺序和性能。大多数 Linux 的安装过程会将 `LANG` 或其他有关的变量设置为符合本地的设置。意识到当你改变语言环境时,排序的结果可能会改变。明白国际化可能会时 sort 或其他命令运行效率下降*许多倍*。某些情况下(例如集合运算)你可以放心的使用 `export LC_ALL=C` 来忽略掉国际化并使用基于字节的顺序。 -- 了解 `awk` 和 `sed` 关于数据的简单处理的用法。例如,将文本文件中第三列的所有数字求和:`awk '{ x += $3 } END { print x }'`. 这可能比同等作用的 Python 代码块三倍且代码量少三倍。 +- 了解 `awk` 和 `sed` 关于数据的简单处理的用法。例如,将文本文件中第三列的所有数字求和:`awk '{ x += $3 } END { print x }'`. 这可能比同等作用的 Python 代码快三倍且代码量少三倍。 - 替换一个或多个文件中出现的字符串: ```sh @@ -201,7 +211,7 @@ repren --full --preserve-case --from foo --to bar . ``` -- 使用 `shuf` 从一个文件中随机选取行。 +- 使用 `shuf` 从一个文件中随机选取多行。 - 了解 `sort` 的参数。处理数字方面,使用 `-n` 或者 `-h` 来处理可读性数字(例如 `du -h` 的输出)。明白键的工作原理(`-t` 和 `-k`)。例如,注意到你需要 `-k1,1` 来仅按第一个域来排序,而 `-k1` 意味着按整行排序。稳定排序(`sort -s`)在某些情况下很有用。例如,以第二个域为主关键字,第一个域为次关键字进行排序,你可以使用 `sort -k1,1 | sort -s -k2,2`。 @@ -231,6 +241,8 @@ - 使用 `iostat`、`netstat`、`top` (`htop` 更佳)和 `dstat` 去获取硬盘、cpu 和网络的状态。熟练掌握这些工具可以使你快速的对系统的当前状态有一个大概的认识。 +- 使用 `netstat` 和 `ss` 查看网络连接的细节。 + - 若要对系统有一个深度的总体认识,使用 [`glances`](https://github.com/nicolargo/glances)。它在一个终端窗口中向你提供一些系统级的数据。这对于快速的检查各个子系统非常有帮助。 - 若要了解内存状态,运行并理解 `free` 和 `vmstat` 的输出。尤其注意“cached”的值,它指的是 Linux 内核用来作为文件缓存的内存大小,因此它与空闲内存无关。 @@ -259,7 +271,7 @@ - 关于更深层次的系统分析以及性能分析,看看 `stap`([SystemTap](https://sourceware.org/systemtap/wiki)),[`perf`](http://en.wikipedia.org/wiki/Perf_(Linux)),以及[`sysdig`](https://github.com/draios/sysdig)。 -- 查看你当前使用的系统,使用 `uname` 或者 `uname -a` (Unix/kernel 信息) or `lsb_release -a` (Linux 发行版信息)。 +- 查看你当前使用的系统,使用 `uname` , `uname -a` (Unix/kernel 信息) 或者 `lsb_release -a` (Linux 发行版信息)。 - 无论什么东西工作得很欢乐时试试 `dmesg`(可能是硬件或驱动问题)。 @@ -340,7 +352,7 @@ - `factor`:分解因数 -- `gpg`:加密并签名文件 +- [`gpg`](https://gnupg.org/):加密并签名文件 - `toe`:terminfo entries 列表 @@ -348,7 +360,7 @@ - `socat`:套接字代理,与 `netcat` 类似 -- `slurm`:网络可视化 +- [`slurm`](https://github.com/mattthias/slurm):网络可视化 - `dd`:文件或设备间传输数据 @@ -360,6 +372,12 @@ - `time`:执行命令,并计算执行时间 +- `lockfile`:使文件只能通过 `rm -f` 移除 + +- `logrotate`: 切换、压缩以及发送日志文件 + +- `watch`:重复运行同一个命令,展示结果并高亮有更改的部分 + - `tac`:反向输出文件 - `shuf`:文件中随机选取几行 @@ -368,7 +386,7 @@ - `pv`:监视通过管道的数据 -- `hd` 和 `bvi`:保存或编辑二进制文件 +- `hd`,`hexdump`,`xxd`,`biew` 和 `bvi`:保存或编辑二进制文件 - `strings`:从二进制文件中抽取文本 @@ -378,8 +396,12 @@ - `split` 和 `csplit`:分割文件 +- `sponge`:在写入前读取所有输入,在读取文件后再向同一文件写入时比较有用,例如 `grep -v something some-file | sponge some-file` + - `units`:将一种计量单位转换为另一种等效的计量单位(参阅 `/usr/share/units/definitions.units`) +- `apg`:随机生成密码 + - `7z`:高比例的文件压缩 - `ldd`:动态库信息 @@ -452,6 +474,8 @@ - 用 `pbcopy` 复制任何命令的输出到桌面应用,用 `pbpaste` 粘贴输入。 +- 在终端中将 Option 键视为 alt 键,Preferences -> Profiles -> Keyboard 勾选上 "Use Option as Meta key"。 + - 用 `open` 或者 `open -a /Applications/Whatever.app` 使用桌面应用打开文件。 - Spotlight: 用 `mdfind` 搜索文件,用 `mdls` 列出元数据(例如照片的 EXIF 信息)。 @@ -462,7 +486,9 @@ ## 更多资源 - [awesome-shell](https://github.com/alebcay/awesome-shell):一份精心组织的命令行工具及资源的列表。 -- [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/):为了编写更好的脚本文件。 +- [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/):为了编写更好的脚本文件。. +- [shellcheck](https://github.com/koalaman/shellcheck):一个 shell 脚本分析工具,基本上等同于 bash/sh/zsh 的 lint。 +- [Filenames and Pathnames in Shell](http://www.dwheeler.com/essays/filenames-in-shell.html):在 shell 脚本里正确处理文件名的好工具。 ## 免责声明 From 7b85fba0bdf1033b66ffc54ce16484dc50cc5b61 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Wed, 7 Oct 2015 09:15:23 -0700 Subject: [PATCH 54/59] More info on rsync And a useful tip for deleting files quickly. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index f18189f..b50166c 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,11 @@ Notes: repren --full --preserve-case --from foo --to bar . ``` +- As the man page says, `rsync` really is a fast and extraordinarily versatile file copying tool. It's known for synchronizing between machines but is equally useful locally. It also is among the [fastest ways](https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html) to delete large numbers of files: +```sh +mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir +``` + - Use `shuf` to shuffle or select random lines from a file. - Know `sort`'s options. For numbers, use `-n`, or `-h` for handling human-readable numbers (e.g. from `du -h`). Know how keys work (`-t` and `-k`). In particular, watch out that you need to write `-k1,1` to sort by only the first field; `-k1` means sort according to the whole line. Stable sort (`sort -s`) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use `sort -k1,1 | sort -s -k2,2`. From 539313fb5b26ebb5e31f7bda20996b34efe4b274 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 8 Oct 2015 18:10:29 +0200 Subject: [PATCH 55/59] sl: update translation up to 7b85fba0 --- README-sl.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README-sl.md b/README-sl.md index 655b40f..9f60914 100644 --- a/README-sl.md +++ b/README-sl.md @@ -217,6 +217,11 @@ Opombe: repren --full --preserve-case --from foo --to bar . ``` +- Kot pravi stran vodiča, je `rsync` resnično hiter in izredno vsestransko orodje kopiranja datotek. Znano je po sinhronizaciji med napravami vendar je enakovredno uporaben tudi lokalno. Je tudi eden izmed [najhitrejših načinov](https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html) za izbris velikega števila datotek: +```sh +mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir +``` + - Uporabite `shuf` za naključno mešanje ali izbiro naključnih vrstic iz datoteke. - Poznajte opcije za `sort`. Za številke uporabite `-n` ali `-h` za upravljanje številk človeku prijaznih za branje (npr. iz `du -h`). Vedite, kako delujejo ključi (`-t` in `-k`). Še posebej pazite, da morate zapisati `-k1,1`, da razvrstite samo po prvem polju; `-k1` pomeni razvrščanje glede na celotno vrstico. Stabilno razvrščanje (`sort -s`) je lahko uporabno. Na primer, da sortirate najprej po polju 2 in nato po polju 1, lahko uporabite `sort -k1,1 | sort -s -k2,2`. @@ -295,7 +300,7 @@ Nekaj primerov sestavljanja ukazov skupaj: cat a b b | sort | uniq -u > c # c is set difference a - b ``` -- Uporabite `grep . *`, da vizualno preučite vse vsebine vseh datotek v direktoriju, npr. za direktorije napolnjene s konfiguracijskimi nastavitvami, kot so `/sys`, `/proc`, `/etc`. +- Uporabite `grep . *`, da hitro preučite vsebine vseh datotek v direktoriju (vsaka vrstica ima par z imenom datoteke) ali `head -100 *` (da iima vsaka datoteka glavo). To je lahko uporabno za direktorije napolnjene s konfiguracijskimi nastavitvami, kot so tiste v `/sys`, `/proc`, `/etc`. - Povzetje vseh številk v tretjem stolpcu tekstovne datoteke (to je verjetno 3X hitrejše in 3X manj kode kot Python-ov ekvivalent): From fd559e2de47ba9a8a0e46d61ddb7f01380221af9 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Thu, 8 Oct 2015 14:08:10 -0700 Subject: [PATCH 56/59] MacOS: sw_vers --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b50166c..db996db 100644 --- a/README.md +++ b/README.md @@ -499,6 +499,8 @@ These are items relevant *only* on MacOS. - Be aware MacOS is based on BSD Unix, and many commands (for example `ps`, `ls`, `tail`, `awk`, `sed`) have many subtle variations from Linux, which is largely influenced by System V-style Unix and GNU tools. You can often tell the difference by noting a man page has the heading "BSD General Commands Manual." In some cases GNU versions can be installed, too (such as `gawk` and `gsed` for GNU awk and sed). If writing cross-platform Bash scripts, avoid such commands (for example, consider Python or `perl`) or test carefully. +- To get MacOS release information, use `sw_vers`. + ## More resources From 29dcb0ef2b4c50b0d400e42dd327037fbdd3c726 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 8 Oct 2015 23:18:10 +0200 Subject: [PATCH 57/59] sl: sync translation with English version up to fd559e2de47ba9a8a0e46d61ddb7f01380221af9 --- README-sl.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README-sl.md b/README-sl.md index 9f60914..ee114e6 100644 --- a/README-sl.md +++ b/README-sl.md @@ -499,6 +499,8 @@ To so elementi pomembni *samo* za MacOS. - Bodite pozorni, saj je MacOS osnovan na BSD Unix in mnogi ukazi (na primer `ps`, `ls`, `tail`, `awk`, `sed`) imajo mnoge subtilne različice iz Linux-a, na katerega je večinoma vplival System V-style Unix in GNU tools. Pogostokrat lahko poveste razliko tako, da opazite, da ima stran man naslov "BSD General Commands Manual." V nekaterih primerih se lahko namestijo tudi GNU različice (kot so `gawk` in `gsed` za GNU awk in sed). Če pišete skripte Bash za vse platforme, se izogibajte takim ukazom (na primer, z upoštevanjem Python ali `perl`) ali pazljivo testirajte. +- Da dobite informacije o izdaji MacOS, uporabite `sw_vers`. + ## Več virov From 4d81736d74780d38c04beb306fea6a58ef3101f7 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Tue, 20 Oct 2015 18:16:53 -0700 Subject: [PATCH 58/59] Add link to awesome-osx-command-line --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index db996db..61afbe5 100644 --- a/README.md +++ b/README.md @@ -505,6 +505,7 @@ These are items relevant *only* on MacOS. ## More resources - [awesome-shell](https://github.com/alebcay/awesome-shell): A curated list of shell tools and resources. +- [awesome-osx-command-line](https://github.com/herrbischoff/awesome-osx-command-line): A more in-depth guide for the Mac OS command line - [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) for writing better shell scripts. - [shellcheck](https://github.com/koalaman/shellcheck): A shell script static analysis tool. Essentially, lint for bash/sh/zsh. - [Filenames and Pathnames in Shell](http://www.dwheeler.com/essays/filenames-in-shell.html): The sadly complex minutiae on how to handle filenames correctly in shell scripts. From a3bca687c9e6e87a8c19a48c973d17fcf33708a7 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 22 Oct 2015 21:40:06 +0200 Subject: [PATCH 59/59] sl: update translation --- README-sl.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README-sl.md b/README-sl.md index ee114e6..96cf4f1 100644 --- a/README-sl.md +++ b/README-sl.md @@ -505,6 +505,7 @@ To so elementi pomembni *samo* za MacOS. ## Več virov - [awesome-shell](https://github.com/alebcay/awesome-shell): urejan seznam orodij lupine in virov. +- [awesome-osx-command-line](https://github.com/herrbischoff/awesome-osx-command-line): Bolj poglobljen vodič za Mac OS ukazno vrstico. - [Strict mode](http://redsymbol.net/articles/unofficial-bash-strict-mode/) za pisanje boljših skript lupine. - [shellcheck](https://github.com/koalaman/shellcheck): lupinska skripta orodja statične analize. V osnovi, lint za bash/sh/zsh. - [Filenames and Pathnames in Shell](http://www.dwheeler.com/essays/filenames-in-shell.html): Na žalost kompleksne podrobnosti, kako pravilno ravnati z imeni datotek v lupinskih skriptah.