Commit MetaInfo

修订版4a40cd086ae64928283c48e53ea4a83bce864450 (tree)
时间2022-08-12 23:55:05
作者Erik <erikgronwal@user...>
CommiterErik

Log Message

Regular updates

更改概述

差异

--- a/js-array.md
+++ b/js-array.md
@@ -14,6 +14,8 @@ list = [a,b,c,d,e]
1414 ```bash
1515 list[1] // → b
1616 list.indexOf(b) // → 1
17+list.lastIndexOf(b) // → 1
18+list.includes(b) // → true
1719 ```
1820
1921 ### Subsets
@@ -82,6 +84,10 @@ list.splice(2, 1) // → [c] list == [a,b,d,e]
8284 ```
8385
8486 ```bash
87+.forEach(n => ...)
88+```
89+
90+```bash
8591 .find(n => ...) // es6
8692 .findIndex(...) // es6
8793 ```
--- /dev/null
+++ b/tar.md
@@ -0,0 +1,46 @@
1+---
2+title: tar
3+category: CLI
4+layout: 2017/sheet
5+updated: 2022-08-11
6+intro: Concatenate, Deflate, Inflate files
7+---
8+## Reference
9+{:.-two-column}
10+
11+### Deflate / Inflate / Concatenate
12+```shell
13+# Deflate / Compress
14+tar -czf archive.tar.gz /path/files
15+```
16+
17+```shell
18+# Inflate / Uncompress
19+tar -xzf archive.tar.gz
20+```
21+
22+```shell
23+# Concatenate files into a single tar
24+tar -cf archive.tar /path/files
25+```
26+
27+```shell
28+# Extract file to a defined directory
29+tar -xzf archive.tar.gz -C /target/directory
30+```
31+
32+```shell
33+# Append a file to an existing archive
34+tar -zu archive.tar.gz -C /target/file
35+```
36+
37+### Common options
38+
39+| Option | Description |
40+|--------|--------------------------------------------------------------------------|
41+| `z` | compress with gzip |
42+| `c` | create an archive |
43+| `u` | append files which are newer than the corresponding copy ibn the archive |
44+| `f` | filename of the archive |
45+| `v` | verbose, display what is inflated or deflated |
46+| `a` | unlike of `z`, determine compression based on file extension |
Show on old repository browser